diff --git a/src/platform/web/parsehtml.js b/src/platform/web/parsehtml.js index 21c8f39a..e80ec995 100644 --- a/src/platform/web/parsehtml.js +++ b/src/platform/web/parsehtml.js @@ -64,6 +64,6 @@ export function parseHTML(html) { // If DOMPurify uses DOMParser, can't we just get the built tree from it // instead of re-parsing? const sanitized = DOMPurify.sanitize(html, sanitizeConfig); - const bodyNode = new DOMParser().parseFromString(sanitized, "text/html").body; + const bodyNode = new DOMParser().parseFromString(`${sanitized}`, "text/html").body; return new HTMLParseResult(bodyNode); }