Skip to content

Commit 01c9d62

Browse files
committed
fix sanitizing bug in Code block
1 parent 81441a0 commit 01c9d62

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

browser/lib/markdown.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ var md = markdownit({
1414
return hljs.highlight(lang, str).value
1515
} catch (e) {}
1616
}
17-
return str
17+
return str.replace(/\&/g, '&amp;').replace(/\</g, '&lt;').replace(/\>/g, '&gt;').replace(/\"/g, '&quot;')
1818
}
1919
})
2020
md.use(emoji, {

0 commit comments

Comments
 (0)