diff --git a/frontend/src/Metamaps/Util.js b/frontend/src/Metamaps/Util.js index f02a4ada..482cc03b 100644 --- a/frontend/src/Metamaps/Util.js +++ b/frontend/src/Metamaps/Util.js @@ -129,9 +129,10 @@ const Util = { } }, mdToHTML: text => { + const safeText = text || '' // use safe: true to filter xss return new HtmlRenderer({ safe: true }) - .render(new Parser().parse(text)) + .render(new Parser().parse(safeText)) }, logCanvasAttributes: function(canvas){ const fakeMgraph = { canvas }