2

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/〇 it generates empty paths example.com// .

To reproduce this behaviour, add

slug: "foo〇○〡〤〢⺮〣21三bar"

in the front matter of any page Hugo will generate the following stripped path:

http://localhost:1313/foo21三bar/` 

removing 〇○〡〤〢⺮〣.

Tested with latest Hugo release: Hugo Static Site Generator v0.30.2 linux/amd64 BuildDate: 2017-10-19T08:34:27-03:00

(x-post at discourse.hugo.com)

marcanuy
  • 23,118
  • 9
  • 64
  • 113

1 Answers1

1

I found workaround to disable encoding/escaping of urls that contain UTF-8 (non english) chars, e.g.

<img {{ printf "src='%s%s'" .Site.BaseURL .imageUrl | safeHTMLAttr }} >
Maksim Shamihulau
  • 1,219
  • 1
  • 15
  • 17