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

Always normalize the result of the relative_url filter (3.4.x backport) #6186

Merged
merged 2 commits into from Jul 1, 2017

Conversation

Projects
None yet
4 participants
@benbalter
Contributor

benbalter commented Jun 28, 2017

Backport of #6185 for the 3.4.x branch since #6137 was backported and introduced the bug.

@benbalter benbalter requested a review from parkr Jun 28, 2017

@benbalter

This comment has been minimized.

Show comment
Hide comment
@benbalter

benbalter Jun 28, 2017

Contributor

Added a test via dc6e5bc and confirmed it fails as expected on 3.5-stable.

Contributor

benbalter commented Jun 28, 2017

Added a test via dc6e5bc and confirmed it fails as expected on 3.5-stable.

@Julina95

This comment has been minimized.

Show comment
Hide comment
@Julina95

Julina95 Jun 30, 2017

Backport of #6185 for the 3.4.x branch since #6137 was backported and introduced the bug.
forskolinfuel-reviewsWhy it Fails?

Backport of #6185 for the 3.4.x branch since #6137 was backported and introduced the bug.
forskolinfuel-reviewsWhy it Fails?

@@ -23,9 +23,9 @@ def absolute_url(input)
def relative_url(input)
return if input.nil?
site = @context.registers[:site]
return ensure_leading_slash(input.to_s) if site.config["baseurl"].nil?
parts = [site.config["baseurl"], input]

This comment has been minimized.

@parkr

parkr Jul 1, 2017

Member

The other method in master, sanitized_baseurl, always returns a string, which means this code is not valid on master. Here, site.config["baseurl"] can be nil, but on master, parts.compact is always a no-op. @benbalter, does that invalidate the PR on master?

@parkr

parkr Jul 1, 2017

Member

The other method in master, sanitized_baseurl, always returns a string, which means this code is not valid on master. Here, site.config["baseurl"] can be nil, but on master, parts.compact is always a no-op. @benbalter, does that invalidate the PR on master?

@parkr

This comment has been minimized.

Show comment
Hide comment
@parkr

parkr Jul 1, 2017

Member

All tests pass for me locally.

Member

parkr commented Jul 1, 2017

All tests pass for me locally.

@parkr parkr merged commit 001ad63 into 3.4-stable Jul 1, 2017

@parkr parkr deleted the normalize-relative-urls branch Jul 1, 2017

@parkr

This comment has been minimized.

Show comment
Hide comment
Member

parkr commented Jul 1, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment