don't strip tags for very large text notes, #1500

This commit is contained in:
zadam 2020-12-24 23:37:21 +01:00
parent 749b6cb57e
commit a266d6a3d5
2 changed files with 2 additions and 2 deletions

View file

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

View file

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