From 25bd26bea678635ce00d365b4359bd4951da4545 Mon Sep 17 00:00:00 2001 From: kolaente Date: Wed, 21 Jun 2023 15:12:45 +0200 Subject: [PATCH] chore(editor): disable deprecated marked options --- src/components/input/editor.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/input/editor.vue b/src/components/input/editor.vue index e49c36e47..e4fe87a0c 100644 --- a/src/components/input/editor.vue +++ b/src/components/input/editor.vue @@ -226,7 +226,10 @@ function findNthIndex(str: string, n: number) { function renderPreview() { setupMarkdownRenderer(checkboxId.value) - preview.value = DOMPurify.sanitize(marked(text.value), {ADD_ATTR: ['target']}) + preview.value = DOMPurify.sanitize(marked(text.value, { + mangle: false, + headerIds: false, + }), {ADD_ATTR: ['target']}) // Since the render function is synchronous, we can't do async http requests in it. // Therefore, we can't resolve the blob url at (markdown) compile time.