You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you have a http://localhost:3001/search?q=red%2Byellow+orange URL, according to search params serialization, q should be red+yellow orange. However, inside validateSearch, we currently end up with red+yellow+orange, which, in my understanding, is invalid.
So I have to replace + with , but the actual + would also be replaced with a whitespace, making + actually unusable in search params.
Which project does this relate to?
Router
Describe the bug
If you have a
http://localhost:3001/search?q=red%2Byellow+orange
URL, according to search params serialization,q
should bered+yellow orange
. However, insidevalidateSearch
, we currently end up withred+yellow+orange
, which, in my understanding, is invalid.So I have to replace
, but the actual
+
with+
would also be replaced with a whitespace, making+
actually unusable in search params.Am I missing something?
Your Example Website or App
https://stackblitz.com/edit/tanstack-react-router-whitespace-issue?file=src%2Froutes%2Findex.tsx
Steps to Reproduce the Bug or Issue
Create a route and log the param in
validateSearch
. Try with?q=red%2Byellow+orange
and you'll see printed{ q: 'red+yellow+orange' }
.Expected behavior
I would have expected to see printed
{ q: 'red+yellow orange' }
or the raw{ q: 'red%2Byellow+orange' }
.Screenshots or Videos
Platform
Additional context
Thank you for this great library, the type-safety is a game-changer!
The text was updated successfully, but these errors were encountered: