From f8d82336b36a3ad8d13ce454f29b339973ec4c9c Mon Sep 17 00:00:00 2001 From: Thomas Haaf Date: Tue, 25 Jun 2024 10:39:17 +0200 Subject: [PATCH] fix missing text on mermaid diagrams --- common/src/markdown-converter-common.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/markdown-converter-common.ts b/common/src/markdown-converter-common.ts index 6d0f14b..da72dba 100644 --- a/common/src/markdown-converter-common.ts +++ b/common/src/markdown-converter-common.ts @@ -136,7 +136,7 @@ export abstract class MarkdownConverter { .then((parsedInput) => this.dompurify.sanitize(parsedInput, { // Allowed tags and attributes inside markdown - ADD_TAGS: ["iframe"], + ADD_TAGS: ["iframe", "foreignObject"], // foreignObject is needed for SVGs that show html tags inside them like mermaid-diagrams ADD_ATTR: ["allow", "allowfullscreen", "frameborder", "scrolling"], }), );