From 05373dc89ee65de8b3364912d72239cfca06b3c7 Mon Sep 17 00:00:00 2001 From: Yuki Hattori Date: Sun, 10 Sep 2023 08:30:39 +0900 Subject: [PATCH] Escape alt text when rendering into
--- src/markdown/background_image/advanced.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/markdown/background_image/advanced.js b/src/markdown/background_image/advanced.js index f14f84a..d3b44aa 100644 --- a/src/markdown/background_image/advanced.js +++ b/src/markdown/background_image/advanced.js @@ -185,7 +185,10 @@ function _advancedBackground(md) { ) .trim() - if (figcaption) return `${open}
${figcaption}
` + if (figcaption) + return `${open}
${md.utils.escapeHtml( + figcaption, + )}
` } return open