-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Closed
Description
This is the opposite take on #13291.
After fixing #13286 then

Will become PlainText=
A’s is > B’s
This will in a hook similar to Hugo's internal:
<img src="{{ $src }}" alt="{{ .PlainText }}"...End up as
<img src="sunsets.jpg" alt="A&rsquo;s is &;gt; B&rsquo;s"></p>
Which is invalid.
Note that this is currently only (I think) an issue when using the typographer extension (default on) and having apostrophes in your image alt texts eg.
We really want .PlainText to be format agnostic, and the only current way I can think about fixing this, is to convert these HTML entities back to their real characters. Goldmark has an utility func for doing that.