Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

can.route mangles hash value when you change it to a value including query parameters.

$
0
0

Can route is updating the hash with overly-agressive URL encoding when you put query string params into the hashbang.  And it is buggy in that it is inserting an & after the #! when it does this as well.

e.g. as soon as you change the hash to: #!auth/logon?foo=bar&stuff=somethingelse

This triggers a route change that causes canjs to rewrite the hashbang thusly:

#!&auth%2Flogon%3Ffoo%3Dbar=&stuff=somethingelse

1. It is URL-encoding the entirety of the right-hand-side instead of piecewise to preserve the legitimate metacharacters = ?
2. It is mangling the route by putting a stray & right after the #!

This is both with 1.1.4 and 1.1.5 AMD versions.

Viewing all articles
Browse latest Browse all 3491

Trending Articles