mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
Strip reply fallback
This commit is contained in:
parent
35a13842af
commit
f6cf3b378b
@ -346,6 +346,10 @@ class Deserializer {
|
||||
}
|
||||
|
||||
export function parseHTMLBody(platform, mediaRepository, allowReplies, html) {
|
||||
if (allowReplies) {
|
||||
// todo: might be better to remove mx-reply and children after parsing, need to think
|
||||
html = html.replace(/<mx-reply>.+<\/mx-reply>/, "");
|
||||
}
|
||||
const parseResult = platform.parseHTML(html);
|
||||
const deserializer = new Deserializer(parseResult, mediaRepository, allowReplies);
|
||||
const parts = deserializer.parseAnyNodes(parseResult.rootNodes);
|
||||
|
Loading…
Reference in New Issue
Block a user