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

helpers: fix invalid pagination links #2374

Closed
wants to merge 1 commit into from

Conversation

shapeshed
Copy link
Contributor

@shapeshed shapeshed commented Aug 18, 2016

The path helper incorrectly transforms valid urls causing issues with
pagination. One example is .net

http://localhost:1313/tags/.net/
to
http://localhost:1313/tags/index.net/page/2

The commit adds a regex test to check for .xml or .html extensions
and applies the transformation on a match.

This allows valid URLs like /foo/index.html/bar to also be passed
through.

Fixes #2110

@CLAassistant
Copy link

CLAassistant commented Aug 18, 2016

CLA assistant check
All committers have signed the CLA.

@shapeshed shapeshed changed the title [fix] #2110 Tag ".net" creates invalid pagination helpers: fix invalid pagination links fixes #2110 Sep 21, 2016
The path helper incorrectly transforms valid urls causing issues with
pagination. One example is `.net`

http://localhost:1313/tags/.net/
to
http://localhost:1313/tags/index.net/page/2

The commit adds a regex test to check for `.xml` or `.html` extensions
and applies the transformation on a match.

This allows valid URLs like /foo/index.html/bar to also be passed
through.

Fixes gohugoio#2110
@shapeshed shapeshed changed the title helpers: fix invalid pagination links fixes #2110 helpers: fix invalid pagination links Oct 3, 2016
@bep bep mentioned this pull request Mar 13, 2017
26 tasks
bep added a commit to bep/hugo that referenced this pull request Mar 27, 2017
This is a pretty fundamental change in Hugo, but absolutely needed if we should have any hope of getting "multiple outputs" done.

This commit's goal is to say:

* Every file target path is created by `createTargetPath`, i.e. one function for all.
* That function takes every page and site parameter into account, to avoid fragile string parsing to uglify etc. later on.
* The path creation logic has full test coverage.
* All permalinks, paginator URLs etc. are then built on top of that same logic.

Fixes gohugoio#1252
Fixes gohugoio#2110
Closes gohugoio#2374
Fixes gohugoio#1885
Fixes gohugoio#3102
Fixes gohugoio#3179
Fixes gohugoio#1641
Fixes gohugoio#1989
@bep bep closed this in 6bf010f Mar 27, 2017
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tag ".net" creates invalid pagination
2 participants