mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 19:46:01 +01:00
fix: allow quote-inline class in mocks sanitizer so quote-post fallback elements can be detected and removed during title generation, fixes #13688
This commit is contained in:
@@ -156,7 +156,10 @@ Notes.assert = async (uid, input, options = { skipChecks: false }) => {
|
||||
|
||||
// mainPid ok to leave as-is
|
||||
if (!title) {
|
||||
const prettified = pretty(content || sourceContent);
|
||||
let prettified = pretty(content || sourceContent);
|
||||
|
||||
// Remove any lines that contain quote-post fallbacks
|
||||
prettified = prettified.split('\n').filter(line => !line.startsWith('<p class="quote-inline"')).join('\'n');
|
||||
const sentences = tokenizer.sentences(prettified, { sanitize: true, newline_boundaries: true });
|
||||
title = sentences.shift();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user