fix: unescaped code in markdown preview panel

pull/1395/head
NGPixel 5 years ago
parent b18dd29fa0
commit 18b2f60b84

@ -243,7 +243,7 @@ const md = new MarkdownIt({
linkify: true,
typography: true,
highlight(str, lang) {
return `<pre class="line-numbers"><code class="language-${lang}">${str}</code></pre>`
return `<pre class="line-numbers"><code class="language-${lang}">${_.escape(str)}</code></pre>`
}
})
.use(mdAttrs, {

Loading…
Cancel
Save