Fix reply tiles not showing the new message

This commit is contained in:
Eric Eastwood 2022-02-09 01:50:05 -06:00
parent eda179a154
commit 4eb24db1de
1 changed files with 4 additions and 1 deletions

View File

@ -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(`<body>${sanitized}</body>`, "text/html").documentElement;
return new HTMLParseResult(bodyNode);
}