mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-31 13:01:31 +08:00 
			
		
		
		
	don't strip tags for very large text notes, #1500
This commit is contained in:
		
							parent
							
								
									b0b2951ff6
								
							
						
					
					
						commit
						749b6cb57e
					
				| @ -42,7 +42,10 @@ class NoteContentProtectedFulltextExp extends Expression { | ||||
| 
 | ||||
|             content = content.toLowerCase(); | ||||
| 
 | ||||
|             if (type === 'text' && mime === 'text/html') { | ||||
|             if (type === 'text' | ||||
|                 && mime === 'text/html' | ||||
|                 && content.length < 50000 // striptags is very slow for large notes
 | ||||
|             ) { | ||||
|                 content = striptags(content); | ||||
|                 content = content.replace(/ /g, ' '); | ||||
|             } | ||||
|  | ||||
| @ -28,7 +28,10 @@ class NoteContentUnprotectedFulltextExp extends Expression { | ||||
| 
 | ||||
|             content = content.toString().toLowerCase(); | ||||
| 
 | ||||
|             if (type === 'text' && mime === 'text/html') { | ||||
|             if (type === 'text' | ||||
|                 && mime === 'text/html' | ||||
|                 && content.length < 50000 // striptags is very slow for large notes
 | ||||
|             ) { | ||||
|                 content = striptags(content); | ||||
|                 content = content.replace(/ /g, ' '); | ||||
|             } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 zadam
						zadam