ampersand-router icon indicating copy to clipboard operation
ampersand-router copied to clipboard

encoded "%" gets stripped fragment in navigate call

Open fde31 opened this issue 9 years ago • 0 comments

I noticed a bug when dealing with encoded percent signs in urls. Take the following simple example:

store/search/<query>

with a query value of % and proper encoding this gets

store/search/%25

When i pass this as a route to the navigate function the fragment gets changed to store/search/%by the decodeURI call in the following line. Changing the URL fragment on navigation appears like a bug to me. Based on navigating around the code a bit and the comment for that function saying that the caller is responsible for proper encoding I wonder if the decodeURI call is actually necessary.

Any thoughts on that? Thanks.

fde31 avatar Jul 28 '15 16:07 fde31