fix: unescaped code in markdown preview panel

This commit is contained in:
NGPixel 2020-01-14 22:41:26 -05:00
parent b18dd29fa0
commit 18b2f60b84

View File

@ -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, {