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
My app has an id string that is partially encoded, e.g. id//github%2Fissues
I encode this (using encodeURIComponent) to id%2F%2Fgithub%252Fissues in the URL. <Link to='/id%2F%2Fgithub%252Fissues'>link</Link>
It is still encoded in the address bar.
Use a path of /:id
I then receive this back as parameter match.params.id which when printed out is id%2F%2Fgithub%2Fissues (note %252F has become %2F - looks like decodeURI was run on it)
I decode it (using decodeURIComponent) and get id//github/issues back
I was using koa router and this worked as expected, but refactoring to react router is causing this issue. Can this be fixed, or is there a way to disable what looks like decodeURI in step 4? I cannot get my original id back.
The text was updated successfully, but these errors were encountered:
Version
4.2.0
Test Case
https://codesandbox.io/s/qxv30r58m6
Steps to reproduce
id//github%2Fissues
encodeURIComponent
) toid%2F%2Fgithub%252Fissues
in the URL.<Link to='/id%2F%2Fgithub%252Fissues'>link</Link>
It is still encoded in the address bar.
/:id
match.params.id
which when printed out isid%2F%2Fgithub%2Fissues
(note%252F
has become%2F
- looks likedecodeURI
was run on it)decodeURIComponent
) and getid//github/issues
backExpected:
id//github%2Fissues
Actual:
id//github/issues
I was using koa router and this worked as expected, but refactoring to react router is causing this issue. Can this be fixed, or is there a way to disable what looks like
decodeURI
in step 4? I cannot get my original id back.The text was updated successfully, but these errors were encountered: