mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 11:35:04 +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) {
|
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 parseResult = platform.parseHTML(html);
|
||||||
const deserializer = new Deserializer(parseResult, mediaRepository, allowReplies);
|
const deserializer = new Deserializer(parseResult, mediaRepository, allowReplies);
|
||||||
const parts = deserializer.parseAnyNodes(parseResult.rootNodes);
|
const parts = deserializer.parseAnyNodes(parseResult.rootNodes);
|
||||||
|
Loading…
Reference in New Issue
Block a user