summaryrefslogtreecommitdiffstats
path: root/markup/goldmark/render_hooks.go
diff options
context:
space:
mode:
authorJoe Mooring <joe.mooring@veriphor.com>2022-03-02 09:30:57 -0800
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2022-03-02 21:05:33 +0100
commite46e9ceb29581de3a32c8155f7cfd58ab59b2b8f (patch)
treec6b65d99a9ea8aa046187d3045357b8b228e6dbf /markup/goldmark/render_hooks.go
parent883e71c96a8b0004943d26e73c830061a2ae872c (diff)
markup/goldmark: Escape image alt attribute
Fixes #9594
Diffstat (limited to 'markup/goldmark/render_hooks.go')
-rw-r--r--markup/goldmark/render_hooks.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/markup/goldmark/render_hooks.go b/markup/goldmark/render_hooks.go
index d5e35380a..138a60d26 100644
--- a/markup/goldmark/render_hooks.go
+++ b/markup/goldmark/render_hooks.go
@@ -175,7 +175,7 @@ func (r *hookedRenderer) renderImageDefault(w util.BufWriter, source []byte, nod
_, _ = w.Write(util.EscapeHTML(util.URLEscape(n.Destination, true)))
}
_, _ = w.WriteString(`" alt="`)
- _, _ = w.Write(n.Text(source))
+ _, _ = w.Write(util.EscapeHTML(n.Text(source)))
_ = w.WriteByte('"')
if n.Title != nil {
_, _ = w.WriteString(` title="`)