mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2025-03-03 07:50:13 +00:00

escaping of special characters is omitted resulting in illegal content, safeHTML does escape too much, so we revert it partly
9 lines
No EOL
304 B
HTML
9 lines
No EOL
304 B
HTML
{{- $context := .context }}
|
|
{{- $content := .content }}
|
|
{{- $align := .align | default "center" }}
|
|
{{- with $context }}
|
|
<div class="mermaid" align="{{ $align }}">
|
|
{{- replaceRE "'" "'" ( replaceRE """ "\"" ( $content | safeHTML ) ) -}}
|
|
</div>
|
|
{{- .Page.Store.Set "hasMermaid" true }}
|
|
{{- end }} |