From 4892694e770cb5dea68aea4f19e76f2fd835260e Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Thu, 3 May 2018 11:24:10 +0100 Subject: [PATCH] use more explicit reply fallback closing tag construct to fix 6657 Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/components/views/elements/ReplyThread.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/components/views/elements/ReplyThread.js b/src/components/views/elements/ReplyThread.js index 138431259f..c7ca4b2d41 100644 --- a/src/components/views/elements/ReplyThread.js +++ b/src/components/views/elements/ReplyThread.js @@ -97,7 +97,7 @@ export default class ReplyThread extends React.Component { // Part of Replies fallback support static stripHTMLReply(html) { - return html.replace(/^
[\s\S]+?<\/blockquote>/, ''); + return html.replace(/^
[\s\S]+?<\/blockquote>/, ''); } // Part of Replies fallback support @@ -119,7 +119,7 @@ export default class ReplyThread extends React.Component { case 'm.text': case 'm.notice': { html = `
In reply to ${mxid}` - + `
${html || body}
`; + + `
${html || body}
`; const lines = body.trim().split('\n'); if (lines.length > 0) { lines[0] = `<${mxid}> ${lines[0]}`; @@ -129,27 +129,27 @@ export default class ReplyThread extends React.Component { } case 'm.image': html = `
In reply to ${mxid}` - + `
sent an image.
`; + + `
sent an image.
`; body = `> <${mxid}> sent an image.\n\n`; break; case 'm.video': html = `
In reply to ${mxid}` - + `
sent a video.
`; + + `
sent a video.`; body = `> <${mxid}> sent a video.\n\n`; break; case 'm.audio': html = `
In reply to ${mxid}` - + `
sent an audio file.
`; + + `
sent an audio file.`; body = `> <${mxid}> sent an audio file.\n\n`; break; case 'm.file': html = `
In reply to ${mxid}` - + `
sent a file.
`; + + `
sent a file.`; body = `> <${mxid}> sent a file.\n\n`; break; case 'm.emote': { html = `
In reply to * ` - + `${mxid}
${html || body}
`; + + `${mxid}
${html || body}`; const lines = body.trim().split('\n'); if (lines.length > 0) { lines[0] = `* <${mxid}> ${lines[0]}`;