Instantsearch and Routing URLs - Change Filter Titles, ParseURL w/ Spaces Issue

Few issues with Routing URLS using Instant Search; hoping someone can help out with (Sandbox Here).

  1. For those Filters that have Spaces in the title, how would I go about replacing those with underscore (_) when createURL is pushing URL to browser?
    Currently I select the filter “SOLD BY = 12”. URL looks like ?Sold%20By=12. I want it to look like Sold_By=12.

  2. Whenever I load a page with filters applied it only works when the filter doesn’t contain any spaces. When I load one with my underscores it will not auto apply the filter like it does the others:
    Preloads the Type correctly: https://podt2.csb.app/?Type=Chalice
    Does NOT preload correctly: https://podt2.csb.app/?Type=Beer_Mug

I am quite sure these have to do with returning the slug, splitting it and then rejoining with spaces but it is unclear how to implement.

Sandbox Here

Anyone have any ideas utilizing Routing, filters, and spacing issues?

Did you manage to resolve this issue James2? having a similar issue where the filter is not recognised with the space. do not want to add a _ as such just make the link work with the filter selected. thanks