Content render character issue (sample : ' -> ’ )

Hello Hugo,

This d'entrée got rendered as d’entrée. To make it work I had to do this hack : {{ replace .Content "’" "'" | safeHTML }} instead of {{ .Content }}.

Hugo Static Site Generator v0.49 windows/amd64 BuildDate: 2018-09-24T10:01:53Z

It looks like a weird encoding issue (working with Sublime and Notepad++ in parallel, the theme I reused [and modified] has some Japanese in it and I use git bash and command line). The files are in UTF-8.
gots rendered to

I installed hugo 49.2 through ubuntu (embedded in windows 10), cloned repo and build through hugo but issue stays the same.

Any idea :slight_smile: ?


This looks like a Blackfriday bug.

Unfortunately, the only solution I see is to completely disable the Blackfriday smartypants feature (“smart quotes” is part of that and cannot be individually disabled); search for that in docs.

Thank you very much. This does the trick :slight_smile:

 smartypants = false
1 Like

Please report this bug on Blackfriday repo too. Silently masking bugs this way is not very helpful.

I think there is an issue open for this : (open for more than a year).

I “+1” on I'm seeing rsquo in quoted text and it is ugly and unnecessary.

No bug. I use it in production. Here’s the config.toml setting:

And here the output:

Angled quotes are different from straight/curved (smart) quotes.

1 Like

This ' getting rendered as, literally, \u0026rsquo; bit me too - but only when .Summary was being used in the generation of JSON-LD blocks. Turning smartypants off got rid of them. How curious; but thanks for this hint that led to a solution.

A post was split to a new topic: Passing .Summary to jsonify transforms single quotes