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

Percent is not encoded correctly in paths #84

Closed
tdryer opened this issue Feb 1, 2017 · 2 comments
Closed

Percent is not encoded correctly in paths #84

tdryer opened this issue Feb 1, 2017 · 2 comments

Comments

@tdryer
Copy link

tdryer commented Feb 1, 2017

When constructing a path, a reserved character like space is encoded correctly by furl:

>>> furl('http://localhost').add(path=['foo bar']).url
'http://localhost/foo%20bar'

However, a percentage character is not encoded (and the following two characters are capitalized):

>>> furl('http://localhost').add(path=['foo%bar']).url
'http://localhost/foo%BAr'

In this case I'd expect the output to be:

'http://localhost/foo%25bar'
gruns added a commit that referenced this issue Feb 21, 2017
…es Issues #55 and #84. Huge thanks to Thomas Hooper and Tom Dryer.
@gruns
Copy link
Owner

gruns commented Feb 21, 2017

This bug is fixed in the latest furl v0.5.7.

>>> from furl import furl
>>> furl('http://localhost').add(path=['foo bar']).url
'http://localhost/foo%20bar'
>>> furl('http://localhost').add(path=['foo%bar']).url
'http://localhost/foo%25bar'

Update with

pip install furl --upgrade

Thank you for bringing this issue to my attention Tom. Don't hesitate to let me
know if there's anything else I can do for you.

@gruns gruns closed this as completed Feb 21, 2017
@tdryer
Copy link
Author

tdryer commented Feb 21, 2017

Thanks for the fix!

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

2 participants