-
-
Notifications
You must be signed in to change notification settings - Fork 7.7k
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
Add a "no UTF-8 stripping URL" option #4032
Comments
@marcanuy I'm reopening this. I quoted you a part of the comment describing the current behaviour. I'm sure the original motivation for this "unicode sanitize" was good and founded in file system support or something (that function precedes my time on Hugo). So, we cannot just change that behaviour, that would break lots of sites. But we could consider adding some "no URL sanitize whatsoever" option. |
Great, a configuration flag to avoid it would be really helpful, especially for SEO purposes. |
Am I right that this issue is about the same IRI/IRL (International Resource Identifier/Locator) support as this forum topic https://discourse.gohugo.io/t/bug-feature-hugo-wrong-support-non-acsii-symbols-in-url/8375 and closed issue #3039? It would be great to avoid converting valid UTF-8 IRI into percent-encoded URIs at least for two reasons:
And probably better SEO too. A simple option like EnableIRI (false by default) would be great! |
期待 unicode sanitize |
I am working with Chinese content (using UTF-8), while most of the time it generates the right url, sometimes it strips certain Chinese characters from URL.
Some examples of these characters are:
When generating a page for each character, i.e.:
example.com/post/〇
it generates empty pathsexample.com/post//
.Steps
To reproduce the bug, add
in the front matter of any page Hugo will generate the following stripped path:
removing
〇○〡〤〢⺮〣
.*Tested with latest Hugo release:
Hugo Static Site Generator v0.30.2 linux/amd64 BuildDate: 2017-10-19T08:34:27-03:00
, SO:4.10.0-37-generic #41-Ubuntu SMP Fri Oct 6 20:20:37 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux Ubuntu 17.04
*(x-post: stackoverflow.com, forum)
The text was updated successfully, but these errors were encountered: