You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Title used in permalink does not have forward slash escapedΒ #3577
changed the title [-]removePathAccents true leave dot and forward slash in permalinks[/-][+]Title used in permalink does not have dot and forward slash replaced[/+]on Jun 10, 2017
I've recently been working on a similar issue (for taxonomy terms), and while I was in there, I put in a fix for slashes in titles. See #4092 ; for your example, this will generate-
My changes don't do anything with dots -- for my hugo site, the dots are fine. But, it seems to me like it could make sense to add a configurable flag like "disallowDotsInPathSegments" (or, probably a shorter flag name) to optionally alter that behavior.
Does this sound right to you? If my PR is accepted, I could follow it up with something like that.
changed the title [-]Title used in permalink does not have dot and forward slash replaced[/-][+]Title used in permalink does not have forward slash escaped[/+]on Nov 21, 2017
This issue has been automatically marked as stale because it has not had recent activity. The resources of the Hugo team are limited, and so we are asking for your help.
If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.
If this is a feature request, and you feel that it is still relevant and valuable, please tell us why.
This issue will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.
I was asking there if I should open a separate issue, but was open to the possibility that I am just doing something wrong. Glad to document and file a bug if necessary.
Could anyone test this again with Hugo 0.54.0? After #5571 was merged, slashes in titles are not escaped anymore (at least for me). I think this issue should be reopened π
Activity
bep commentedon Jun 10, 2017
You should create an issue about one thing.
frjo commentedon Jun 10, 2017
Better now? The removePathAccents part was due to bad testing by me, it has nothing to do with the problem.
[-]removePathAccents true leave dot and forward slash in permalinks[/-][+]Title used in permalink does not have dot and forward slash replaced[/+]tsuereth commentedon Nov 16, 2017
I've recently been working on a similar issue (for taxonomy terms), and while I was in there, I put in a fix for slashes in titles. See #4092 ; for your example, this will generate-
My changes don't do anything with dots -- for my hugo site, the dots are fine. But, it seems to me like it could make sense to add a configurable flag like "disallowDotsInPathSegments" (or, probably a shorter flag name) to optionally alter that behavior.
Does this sound right to you? If my PR is accepted, I could follow it up with something like that.
moorereason commentedon Nov 21, 2017
@frjo,
You raise two issues:
Forward slashes: Agreed. Similar to Slashes in a taxonomy term break path resolutionΒ #4090. Can likely solve at the same time.
Dots: I see no reason to treat a dot as a special case. They have no special, reserved meaning in file system paths or URLs.
I'm renaming this issue to focus on the forward slash problem. If you want to argue for the dots escaping, open a separate issue.
[-]Title used in permalink does not have dot and forward slash replaced[/-][+]Title used in permalink does not have forward slash escaped[/+]stale commentedon Feb 19, 2018
This issue has been automatically marked as stale because it has not had recent activity. The resources of the Hugo team are limited, and so we are asking for your help.
If this is a bug and you can still reproduce this error on the
masterbranch, please reply with all of the information you have about it in order to keep the issue open.If this is a feature request, and you feel that it is still relevant and valuable, please tell us why.
This issue will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.
tcg commentedon Jul 10, 2018
Apologies if I shouldn't "me, too", but just noticed this in
0.42.2and0.43. I originally ran across it because of hash marks, which I fully expected to be escaped, which I detailed here: https://discourse.gohugo.io/t/hash-pound-sign-not-escaped-in-title-permalink-breaking-urls/12825I was asking there if I should open a separate issue, but was open to the possibility that I am just doing something wrong. Glad to document and file a bug if necessary.
moorereason commentedon Oct 11, 2018
Fixed in #5282
max-arnold commentedon Feb 3, 2019
Could anyone test this again with Hugo 0.54.0? After #5571 was merged, slashes in titles are not escaped anymore (at least for me). I think this issue should be reopened π
sgumirov commentedon May 2, 2020
I can confirm regression with slash is not being escaped in url. Any config flags to enable this?
moorereason commentedon May 2, 2020
This issue has been closed for months. Please open a new issue.
resources/page: Don't let a title's "/" split an auto-derived slug