Skip to content

Commit

Permalink
fix mermaid xss
Browse files Browse the repository at this point in the history
  • Loading branch information
amedora committed May 24, 2019
1 parent 29ea1ca commit 1ff179a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion browser/components/MarkdownPreview.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
)

Expand Down

0 comments on commit 1ff179a

Please sign in to comment.