Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(urlMatcherFactory): fix tilde edge case with "string" encoding #3018

Merged
merged 1 commit into from
Sep 19, 2016
Merged

fix(urlMatcherFactory): fix tilde edge case with "string" encoding #3018

merged 1 commit into from
Sep 19, 2016

Conversation

cvn
Copy link
Contributor

@cvn cvn commented Sep 19, 2016

Hello,

I noticed that "2F" in a param value would be encoded as "~~2F" and then decoded as "/" (plunk). I fixed this so now the encoding/decoding are symmetrical. I think this use case was the reason for encoding "~", and the decoding issue was an oversight.

Note: The problem was in the decode function (valFromString), but I also refactored the encode function (valToString) so that the functions stay easy to read as a pair.

Let me know what you think. If you like it, I also prepared a branch that ports the changes to legacy.

makes it possible to bidirectionally encode/decode "~2F"
@christopherthielen christopherthielen added this to the 1.0.0-final milestone Sep 19, 2016
@christopherthielen christopherthielen merged commit a201906 into angular-ui:master Sep 19, 2016
@christopherthielen
Copy link
Contributor

a perfect PR, thank you!

@cvn cvn deleted the fix-tilde-encoding branch September 19, 2016 23:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants