You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After fixing #13286 we'll end up with internal image/link templates producing invalid markup for .PlainText with HTML entities, e.g:
![A's is > B's](sunsets.jpg)
Will become:
<imgsrc="sunsets.jpg"alt="A&rsquo;s is &gt; B&rsquo;s"></p>
That renders to
Assuming the image does not exist.
So, to fix this, we can either:
Pipe PlainText to safeHTML in our internal templates.
Make PlainText() return template.HTML.
What do you think, @jmooring ? I'm fine with both options. Just to be clear: Goldmark produces the exact same markup for the example above (when markup.goldmark.renderHooks.image.disableDefault=true), but since Content returns template.HTML, that's not an issue.
You could argue that the above is a bug in Go, and I would agree. It should consider HTML entities in its escaping.
The text was updated successfully, but these errors were encountered:
After fixing #13286 we'll end up with internal image/link templates producing invalid markup for
.PlainText
with HTML entities, e.g:Will become:
That renders to
Assuming the image does not exist.
So, to fix this, we can either:
PlainText()
returntemplate.HTML
.What do you think, @jmooring ? I'm fine with both options. Just to be clear: Goldmark produces the exact same markup for the example above (when
markup.goldmark.renderHooks.image.disableDefault=true
), but sinceContent
returnstemplate.HTML
, that's not an issue.You could argue that the above is a bug in Go, and I would agree. It should consider HTML entities in its escaping.
The text was updated successfully, but these errors were encountered: