diff --git a/src/domain/session/room/timeline/deserialize.js b/src/domain/session/room/timeline/deserialize.js index 7da6255d..b66804a5 100644 --- a/src/domain/session/room/timeline/deserialize.js +++ b/src/domain/session/room/timeline/deserialize.js @@ -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>/, ""); + } const parseResult = platform.parseHTML(html); const deserializer = new Deserializer(parseResult, mediaRepository, allowReplies); const parts = deserializer.parseAnyNodes(parseResult.rootNodes);