From f06fef8d3c031cf20d36f91eb93da9e55bb12ebd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Weber?= Date: Fri, 7 Oct 2022 20:08:12 +0200 Subject: [PATCH] mermaid: remove W3C validator errors #337 escaping of special characters is omitted resulting in illegal content, safeHTML does escape too much, so we revert it partly --- layouts/partials/shortcodes/mermaid.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/shortcodes/mermaid.html b/layouts/partials/shortcodes/mermaid.html index 561527a55b..0de0d720dc 100644 --- a/layouts/partials/shortcodes/mermaid.html +++ b/layouts/partials/shortcodes/mermaid.html @@ -3,7 +3,7 @@ {{- $align := .align | default "center" }} {{- with $context }}
- {{- $content | safeHTML -}} + {{- replaceRE "'" "'" ( replaceRE """ "\"" ( $content | safeHTML ) ) -}}
{{- .Page.Store.Set "hasMermaid" true }} {{- end }} \ No newline at end of file