use more explicit reply fallback closing tag construct to fix 6657
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
71a12b6bbb
commit
4892694e77
1 changed files with 7 additions and 7 deletions
|
@ -97,7 +97,7 @@ export default class ReplyThread extends React.Component {
|
||||||
|
|
||||||
// Part of Replies fallback support
|
// Part of Replies fallback support
|
||||||
static stripHTMLReply(html) {
|
static stripHTMLReply(html) {
|
||||||
return html.replace(/^<blockquote data-mx-reply>[\s\S]+?<\/blockquote>/, '');
|
return html.replace(/^<blockquote data-mx-reply>[\s\S]+?<!--end-mx-reply--><\/blockquote>/, '');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Part of Replies fallback support
|
// Part of Replies fallback support
|
||||||
|
@ -119,7 +119,7 @@ export default class ReplyThread extends React.Component {
|
||||||
case 'm.text':
|
case 'm.text':
|
||||||
case 'm.notice': {
|
case 'm.notice': {
|
||||||
html = `<blockquote data-mx-reply><a href="${evLink}">In reply to</a> <a href="${userLink}">${mxid}</a>`
|
html = `<blockquote data-mx-reply><a href="${evLink}">In reply to</a> <a href="${userLink}">${mxid}</a>`
|
||||||
+ `<br>${html || body}</blockquote>`;
|
+ `<br>${html || body}<!--end-mx-reply--></blockquote>`;
|
||||||
const lines = body.trim().split('\n');
|
const lines = body.trim().split('\n');
|
||||||
if (lines.length > 0) {
|
if (lines.length > 0) {
|
||||||
lines[0] = `<${mxid}> ${lines[0]}`;
|
lines[0] = `<${mxid}> ${lines[0]}`;
|
||||||
|
@ -129,27 +129,27 @@ export default class ReplyThread extends React.Component {
|
||||||
}
|
}
|
||||||
case 'm.image':
|
case 'm.image':
|
||||||
html = `<blockquote data-mx-reply><a href="${evLink}">In reply to</a> <a href="${userLink}">${mxid}</a>`
|
html = `<blockquote data-mx-reply><a href="${evLink}">In reply to</a> <a href="${userLink}">${mxid}</a>`
|
||||||
+ `<br>sent an image.</blockquote>`;
|
+ `<br>sent an image.<!--end-mx-reply--></blockquote>`;
|
||||||
body = `> <${mxid}> sent an image.\n\n`;
|
body = `> <${mxid}> sent an image.\n\n`;
|
||||||
break;
|
break;
|
||||||
case 'm.video':
|
case 'm.video':
|
||||||
html = `<blockquote data-mx-reply><a href="${evLink}">In reply to</a> <a href="${userLink}">${mxid}</a>`
|
html = `<blockquote data-mx-reply><a href="${evLink}">In reply to</a> <a href="${userLink}">${mxid}</a>`
|
||||||
+ `<br>sent a video.</blockquote>`;
|
+ `<br>sent a video.<!--end-mx-reply--></blockquote>`;
|
||||||
body = `> <${mxid}> sent a video.\n\n`;
|
body = `> <${mxid}> sent a video.\n\n`;
|
||||||
break;
|
break;
|
||||||
case 'm.audio':
|
case 'm.audio':
|
||||||
html = `<blockquote data-mx-reply><a href="${evLink}">In reply to</a> <a href="${userLink}">${mxid}</a>`
|
html = `<blockquote data-mx-reply><a href="${evLink}">In reply to</a> <a href="${userLink}">${mxid}</a>`
|
||||||
+ `<br>sent an audio file.</blockquote>`;
|
+ `<br>sent an audio file.<!--end-mx-reply--></blockquote>`;
|
||||||
body = `> <${mxid}> sent an audio file.\n\n`;
|
body = `> <${mxid}> sent an audio file.\n\n`;
|
||||||
break;
|
break;
|
||||||
case 'm.file':
|
case 'm.file':
|
||||||
html = `<blockquote data-mx-reply><a href="${evLink}">In reply to</a> <a href="${userLink}">${mxid}</a>`
|
html = `<blockquote data-mx-reply><a href="${evLink}">In reply to</a> <a href="${userLink}">${mxid}</a>`
|
||||||
+ `<br>sent a file.</blockquote>`;
|
+ `<br>sent a file.<!--end-mx-reply--></blockquote>`;
|
||||||
body = `> <${mxid}> sent a file.\n\n`;
|
body = `> <${mxid}> sent a file.\n\n`;
|
||||||
break;
|
break;
|
||||||
case 'm.emote': {
|
case 'm.emote': {
|
||||||
html = `<blockquote data-mx-reply><a href="${evLink}">In reply to</a> * `
|
html = `<blockquote data-mx-reply><a href="${evLink}">In reply to</a> * `
|
||||||
+ `<a href="${userLink}">${mxid}</a><br>${html || body}</blockquote>`;
|
+ `<a href="${userLink}">${mxid}</a><br>${html || body}<!--end-mx-reply--></blockquote>`;
|
||||||
const lines = body.trim().split('\n');
|
const lines = body.trim().split('\n');
|
||||||
if (lines.length > 0) {
|
if (lines.length > 0) {
|
||||||
lines[0] = `* <${mxid}> ${lines[0]}`;
|
lines[0] = `* <${mxid}> ${lines[0]}`;
|
||||||
|
|
Loading…
Reference in a new issue