From 4eb24db1de36607481618a1dda1bd2e45cc90039 Mon Sep 17 00:00:00 2001 From: Eric Eastwood Date: Wed, 9 Feb 2022 01:50:05 -0600 Subject: [PATCH] Fix reply tiles not showing the new message --- src/platform/web/parsehtml.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/platform/web/parsehtml.js b/src/platform/web/parsehtml.js index 21c8f39a..6689c518 100644 --- a/src/platform/web/parsehtml.js +++ b/src/platform/web/parsehtml.js @@ -64,6 +64,9 @@ 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; + // FIXME: DOMParser from linkedom does not behave the same as the browser, + // see https://github.com/WebReflection/linkedom/issues/106 + const bodyNode = new DOMParser().parseFromString(`${sanitized}`, "text/html").documentElement; + return new HTMLParseResult(bodyNode); }