Browse Source

fix: unescaped code in markdown preview panel

pull/1395/head
NGPixel 4 years ago
parent
commit
18b2f60b84
1 changed files with 1 additions and 1 deletions
  1. 2
      client/components/editor/editor-markdown.vue

2
client/components/editor/editor-markdown.vue

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