#How to correctly account for space character in search params

2 messages · Page 1 of 1 (latest)

shy solar
#

Hello,
When I use this code to navigate to a page with given search params, it puts "foo+bar" in to the url. Then, when I click back it navigates to "foo%20bar" with the correct encoding for the space character.

Am I using navigate incorrectly? How can I make it correctly encode the space? Thanks

navigate({
  to: `/search`,
  search: { query: "foo bar" },
})
wise arch
#

a complete minimal example would be helpful to debug this. can you please create one by forking one of the examples on stackblitz?