fix comment quoting

This commit is contained in:
2026-07-28 16:26:26 +02:00
parent 5ab1a9614a
commit 866a8003fe
3 changed files with 14 additions and 7 deletions

View File

@@ -1784,10 +1784,11 @@ class CommentSystem {
if (trimmed.startsWith('>') && !trimmed.match(/^>>\d+/)) {
const quoteContent = line.substring(line.indexOf('>') + 1);
const quoteEmojis = window.f0ckSession?.quote_emojis === true;
const escapedQuote = quoteContent.replace(/>/g, '>');
const renderedContent = quoteEmojis
? quoteContent.replace(/:([a-z0-9_]+):/g, (m, n) => this.renderEmoji(m, n))
: quoteContent;
return `<span class="greentext">&gt;${renderedContent.replace(/>/g, '&gt;')}</span>`;
? escapedQuote.replace(/:([a-z0-9_]+):/g, (m, n) => this.renderEmoji(m, n))
: escapedQuote;
return `<span class="greentext">&gt;${renderedContent}</span>`;
}
// 2. Per-line limit to prevent marked.parse recursion on single giant lines