fix: exclude non-class attributes from markdown rendering in editor preview (#1251)
This commit is contained in:
parent
46630e1638
commit
115472a3fc
@ -233,7 +233,9 @@ const md = new MarkdownIt({
|
|||||||
return `<pre class="line-numbers"><code class="language-${lang}">${str}</code></pre>`
|
return `<pre class="line-numbers"><code class="language-${lang}">${str}</code></pre>`
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.use(mdAttrs)
|
.use(mdAttrs, {
|
||||||
|
allowedAttributes: ['id', 'class', 'target']
|
||||||
|
})
|
||||||
.use(mdEmoji)
|
.use(mdEmoji)
|
||||||
.use(mdTaskLists, {label: true, labelAfter: true})
|
.use(mdTaskLists, {label: true, labelAfter: true})
|
||||||
.use(mdExpandTabs)
|
.use(mdExpandTabs)
|
||||||
|
Loading…
Reference in New Issue
Block a user