This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix($location): always decode special chars in
$location.url(value)
The original fix for #16312 included changing how `$location.url(value)` decoded the special characters passed to it as a setter. This broke a number of use cases (mostly involving the ui-router). Further analysis appears to show that we can solve #16312, to prevent urls being rewritten with decoded values, without modifying the behaviour of `$location.url`. This commit reverts changes to `$location.url(value)` so that encoded chars will once again be decoded and passed to `$location.path(value)`. In particular it will convert encoded forward slashes, which changes how the path is updated, since e.g. `a/b/%2Fc%2Fd` will become `a/b/c/d`. While this is arguably not "correct", it appears that there are too many use cases relying upon this behaviour.
- Loading branch information