Location Hashbang is decoded befre it is split
For hashbang urls, the path is decoded when assigned. This results in paths containing a %2F being split incorrectly
https://github.com/angular/angular.js/blob/master/src/ng/location.js#L183
For example the hashbang #!/foo/bar%2Fbaz will not be matched by /:one/:two
The same issue applies, when passing urls in the path.
As a quick workaround, I ended up double escaping urls before using them in hashbang urls.
would love to see this fixed!
There have been extensive changes to this service over the last few months. Can you confirm that this still happens on master and that the line linked to above is accurate?
I will in the next few days. Sorry for the late reply.
I checked with the latest stable and it was still there, but ran into a weird exception when trying to check against head. Haven't had a chance to try again since then, sorry! Thanks for looking into it @lavieenrose
I just checked and the issue is not there anymore with 1.2.0rc1. I checked setting and getting an url param within the hash fragment, both worked out nicely. Thanks for fixing it!
Hi, we just upgraded to 1.2.3 and got some problems with double decoded $routeParams. An URL containing "/%253A" (double encoded ":") is decoded back to /: instead of /%3A
Parts of the already decoded $location.path() is decoded again here: https://github.com/angular/angular.js/blob/master/src/ngRoute/route.js#L476
This was introduced in this commit: https://github.com/angular/angular.js/commit/04cebcc133c8b433a3ac5f72ed19f3631778142b
Just removing the decodeUriComponent() (or encoding data sent to $locaiton.path) fixes the problem for us
@Addeventure if this is still an issue in master please file a new issue. Thanks!