Use 's' flag with regex if available

This commit is contained in:
RMidhunSuresh 2021-12-21 16:08:17 +05:30
parent cba044eff1
commit 0c3f16e5f6

View file

@ -345,7 +345,7 @@ class Deserializer {
}
export function parseHTMLBody(platform, mediaRepository, html) {
html = html.replace(/<mx-reply>.+<\/mx-reply>/, "");
html = html.replace(/<mx-reply>.+<\/mx-reply>/s, "");
const parseResult = platform.parseHTML(html);
const deserializer = new Deserializer(parseResult, mediaRepository);
const parts = deserializer.parseAnyNodes(parseResult.rootNodes);