Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
`#` not escaped in Permalink when in title value #4926
Initially posed a question in the forum: https://discourse.gohugo.io/t/hash-pound-sign-not-escaped-in-title-permalink-breaking-urls/12825
This seems really strange to me as a default behavior, and feels like a bug. Allow me to asplain?
I have a post title, like
The Permalinks configuration examples in the docs contain the following example:
... which lead me to believe that this would pretty much automatically work for my not-unreasonable post titles. ("work" here meaning "escape the URL for
In the forum, maiki suggested that I might use
Also, the aforementioned docs says this about
Meaning that it will always fall back to
I think this is a bug. (Sadly, I am not yet familiar enough with Go to find a spot and try to offer a PR for the expected behavior).
I am willing to be wrong, and understand I may be Doing It Wrong.
Confirmed, same issue on my machine.
I've even used
I saw #4388 was merged, and I am assuming it made it into v0.48, is that correct?
On the site where I've run into this the most, I'm not seeing this fixed, if that's the case. Or has that merge not made it into a release?
According to the release notes it's included in Hugo 0.48. The issue is the third bullet point in the 'Fixes' part of the 0.48 release notes.
@onedrawingperday Thanks for the suggestion. I think I mentioned previously how I'm working around it. Specifically on one site, I am manually specifying the
I'm of the opinion that the Theme code shouldn't necessarily concern itself with fixing permalink values, etc.
referenced this issue
Sep 6, 2018
added a commit
Sep 14, 2018
We committed PR #5170 to fix this issue, but it was reverted due to the fact that it broke stuff (see #5223). There seems to be some confusion in #5223 about testing against @onedrawingperday's test repo. I don't think I ever tested #5170 against that repo. My testing of that repo was against PR #4388.
I'm hoping to get some free time soon to take another look at these issues.
I know that #5170 was not tested against my test repo (I never requested it and also I had removed the repo from GitHub).
Anyway it's a good thing that I am on the latest Hugo DEV so that I can see if PRs break things before they make it into a release.
I will keep an eye on this issue and any PR that will address it.