1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-12 17:26:17 +00:00

fix mermaid xss

This commit is contained in:
amedora
2019-05-24 15:55:05 +09:00
parent 29ea1ca26b
commit 1ff179a1bd

View File

@@ -845,7 +845,7 @@ export default class MarkdownPreview extends React.Component {
_.forEach(
this.refs.root.contentWindow.document.querySelectorAll('.mermaid'),
el => {
mermaidRender(el, htmlTextHelper.decodeEntities(el.innerHTML), theme)
mermaidRender(el, htmlTextHelper.encodeEntities(el.innerHTML), theme)
}
)