URL parameters are re-encoded when aborting a transition
See original GitHub issueIf any parameter contains a URL encoded value, the value is re-encoded when the transition is aborted.
If the current URL is http://website.com/#!/accounts?PARAM= , calling transition#abort
redirects to http://website.com/#!/accounts?PARAM=%25 instead of the original URL.
Checking transition#abort
, it seems the call to #stringifyPath
performs the double encoding when a String
parameter is passed.
Issue Analytics
- State:
- Created 7 years ago
- Comments:12 (6 by maintainers)
Top Results From Across the Web
URL Encoding Path and Query Parameters
If path or query parameters contain characters that are either reserved or potentially unsafe when used in URLs, those characters must be URL...
Read more >Why does the encoding's of a URL and the query string part ...
I was researching why my query parameters have plus + signs in it instead of %20 and why they have strings like %C3%BC...
Read more >ui-sref initialze controller twice if url has params #1476 - GitHub
I have a TODO somewhere about aborting transitions when non-optional parameters are not provided.
Read more >Params.paramtypedefinition - UI-Router
Typed parameter definitions control how parameter values are encoded (to the URL) and decoded (from the URL). UI-Router always provides the decoded parameter...
Read more >URL encoding affecting Marketing Channel Processing Rule
The Marketing Channel Processing System does not decode the query string parameters in the URL. It assumes that the intended value is encoded ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Dang, totally forgot about this one. Hope I have time to push this tonight, if not it has to wait until the weekend.
@LinusBorg We’re trying out the fix now, but encountering a different problem with encoding. Colons and slashes don’t seem to be encoded after the abort.
e.g.: Original URL, where PARAM = :
It is expected that on abort, URL remains unchanged. But the actual behavior is, the URL now becomes
I think the problem is with the ff. call in
RouteTransition#abort
Shouldn’t the second parameter be
false
?