mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-31 21:11:30 +08:00 
			
		
		
		
	fix sanitization of autocomplete against XSS
This commit is contained in:
		
							parent
							
								
									5ad47d3866
								
							
						
					
					
						commit
						4c3fcc3ea6
					
				| @ -307,7 +307,7 @@ function highlightSearchResults(searchResults, highlightedTokens) { | |||||||
|     for (const result of searchResults) { |     for (const result of searchResults) { | ||||||
|         const note = becca.notes[result.noteId]; |         const note = becca.notes[result.noteId]; | ||||||
| 
 | 
 | ||||||
|         result.highlightedNotePathTitle = result.notePathTitle.replace('/[<\{\}]/g', ''); |         result.highlightedNotePathTitle = result.notePathTitle.replace(/[<{}]/g, ''); | ||||||
| 
 | 
 | ||||||
|         if (highlightedTokens.find(token => note.type.includes(token))) { |         if (highlightedTokens.find(token => note.type.includes(token))) { | ||||||
|             result.highlightedNotePathTitle += ` "type: ${note.type}'`; |             result.highlightedNotePathTitle += ` "type: ${note.type}'`; | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 zadam
						zadam