diff --git a/browser/components/MarkdownPreview.js b/browser/components/MarkdownPreview.js index f191e018..d8bfcfe6 100644 --- a/browser/components/MarkdownPreview.js +++ b/browser/components/MarkdownPreview.js @@ -34,10 +34,9 @@ function encodeHTMLEntities (text) { ['?', '#63'] ] - for (let i = 0; i < entities.length; ++i) { - text = text.replace(entities[i][0], `&${entities[i][1]};`) - } - + entities.forEach((entity) => { + text = text.replace(entity[0], `&${entity[1]};`) + }) return text }