Is it possible to prevent encoding when setting search parameters? #9752
Unanswered
MA-MacDonald
asked this question in
Q&A
Replies: 2 comments
-
No. That's just how the native Browsers tend to be forgiving in what you can enter as the URL, but the values are encoded to ensure the parser will not treat any embedded Perhaps it would have been nice if it only encoded those characters instead of the entire thing. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Ironically, it's exactly the "native encoding" that causes issues with Vite. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is there a way to prevent encoding when setting search parameters?
For example when I do:
setSearchParams({ filters: "foo[bar][baz]=foobarbaz" });
I get:
?filters=foo%5Bbar%5D%5Bbaz%5D%3Dfoobarbaz
I want it to put the exact string in the url like this:
?filters=foo[bar][baz]=foobarbaz
Beta Was this translation helpful? Give feedback.
All reactions