Skip to content

Commit

Permalink
Escape alt text when rendering into <figcaption>
Browse files Browse the repository at this point in the history
  • Loading branch information
yhatt committed Sep 9, 2023
1 parent a4318b3 commit 05373dc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/markdown/background_image/advanced.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,10 @@ function _advancedBackground(md) {
)
.trim()

if (figcaption) return `${open}<figcaption>${figcaption}</figcaption>`
if (figcaption)
return `${open}<figcaption>${md.utils.escapeHtml(
figcaption,
)}</figcaption>`
}

return open
Expand Down

0 comments on commit 05373dc

Please sign in to comment.