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

Issue with unescaping parts of the query string that shouldnt be unescaped #9

Open
ferozed opened this issue Dec 3, 2013 · 0 comments

Comments

@ferozed
Copy link

ferozed commented Dec 3, 2013

I have a url of the form:

http://foo.com?foo=bar&Signature=0hSCasjYRSCxi3fumzRMhHTa%2BV0%3D

If I do a url.parse().unescape.utf8() on it it becomes...

>>> u = url.parse('https://foo.com?foo=bar&Signature=0hSCasjYRSCxi3fumzRMhHTa%2BV0%3D')
>>> u.unescape().utf8()
'https://foo.com/?foo=bar&Signature=0hSCasjYRSCxi3fumzRMhHTa%2BV0%3D'

which is correct, because the query part should not be unescaped.

However, if I take this url, and try to escape it, it becomes invalid...

>>> url.parse(u.unescape().utf8()).escape().utf8()
'https://foo.com/?foo=bar&Signature=0hSCasjYRSCxi3fumzRMhHTa+V0='

It is unescaping when calling escape().

I was expecting the original url to come back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant