From 115472a3fcff499f27f3105dca27598e47c99313 Mon Sep 17 00:00:00 2001 From: Hinaloe Date: Sat, 23 Nov 2019 00:52:19 +0900 Subject: [PATCH] fix: exclude non-class attributes from markdown rendering in editor preview (#1251) --- client/components/editor/editor-markdown.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/components/editor/editor-markdown.vue b/client/components/editor/editor-markdown.vue index 472df31a..8284c4e2 100644 --- a/client/components/editor/editor-markdown.vue +++ b/client/components/editor/editor-markdown.vue @@ -233,7 +233,9 @@ const md = new MarkdownIt({ return `
${str}
` } }) - .use(mdAttrs) + .use(mdAttrs, { + allowedAttributes: ['id', 'class', 'target'] + }) .use(mdEmoji) .use(mdTaskLists, {label: true, labelAfter: true}) .use(mdExpandTabs)