-
Notifications
You must be signed in to change notification settings - Fork 27.6k
decodeURIComponent - prevent URIError #13993
base: master
Are you sure you want to change the base?
Conversation
Replace decodeURIComponent with tryDecodeURIComponent to prevent throwing "URIError: malformed URI sequence". https://github.com/angular/angular.js/blob/master/src/Angular.js#L1275
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed, please reply here (e.g.
|
1 similar comment
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed, please reply here (e.g.
|
I signed it! 2016-02-10 15:34 GMT+01:00 googlebot notifications@github.com:
|
CLAs look good, thanks! |
1 similar comment
CLAs look good, thanks! |
I think this will break the contract that There should also be some tests, verifying the new behavior and guarding against regressions. |
Yes, try to request a page with a #% hash in the URL. Example: Maybe in this example, if decodeURIComponent throws an error, we should catch it and encode hash/uri to keep wrong characters (ex. single %) as encoded UTF? |
Aha, I see the error. TBH, trying to guess and fix unencoded UTF characters is a business I'd rather not be into :) @petebacondarwin, wdyt ? |
Replace decodeURIComponent with tryDecodeURIComponent to prevent throwing "URIError: malformed URI sequence".
https://github.com/angular/angular.js/blob/master/src/Angular.js#L1275