Merge remote-tracking branch 'origin/stable'

This commit is contained in:
zadam 2020-12-25 12:56:34 +01:00
commit 479d6ba964
2 changed files with 8 additions and 2 deletions

View File

@ -43,7 +43,10 @@ class NoteContentProtectedFulltextExp extends Expression {
content = content.toLowerCase();
if (type === 'text' && mime === 'text/html') {
content = striptags(content);
if (content.length < 20000) { // striptags is slow for very large notes
content = striptags(content);
}
content = content.replace(/&nbsp;/g, ' ');
}

View File

@ -29,7 +29,10 @@ class NoteContentUnprotectedFulltextExp extends Expression {
content = content.toString().toLowerCase();
if (type === 'text' && mime === 'text/html') {
content = striptags(content);
if (content.length < 20000) { // striptags is slow for very large notes
content = striptags(content);
}
content = content.replace(/&nbsp;/g, ' ');
}