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

Use Addressable instead of URI to decode #5726

Merged
merged 3 commits into from
Jan 7, 2017
Merged

Conversation

jekyllbot
Copy link
Contributor

PR automatically created for @pathawks.

Use Addressable instead of URI to decode

@pathawks
Copy link
Member

pathawks commented Jan 5, 2017

Word in progress! Ready for review, I guess.

Fixes #4719

@@ -145,7 +145,8 @@ def self.escape_path(path)
# pct-encoded = "%" HEXDIG HEXDIG
# sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
# / "*" / "+" / "," / ";" / "="
URI.escape(path, %r{[^a-zA-Z\d\-._~!$&'()*+,;=:@\/]}).encode("utf-8")
path = Addressable::URI.encode(path)
path.encode("utf-8").sub("#", "%23")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aside from escaping # (which I cannot understand), Addressable seems to perfectly fit our needs 👍

@ghost
Copy link

ghost commented Jan 7, 2017

@jekyllbot: merge +minor

@jekyllbot jekyllbot merged commit 214eedc into master Jan 7, 2017
@jekyllbot jekyllbot deleted the pull/remove-deprecated branch January 7, 2017 11:37
jekyllbot added a commit that referenced this pull request Jan 7, 2017
@pathawks pathawks mentioned this pull request Jan 7, 2017
2 tasks
@jekyll jekyll locked and limited conversation to collaborators Jul 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants