#452 - Fix highlighting with escaped html

This commit is contained in:
Simon Cambier
2025-03-26 21:34:18 +01:00
parent ee55615951
commit 157d985a05

View File

@@ -102,6 +102,7 @@ export class TextProcessor {
* @param query
*/
public getMatches(text: string, words: string[], query?: Query): SearchMatch[] {
words = words.map(escapeHTML)
const reg = this.stringsToRegex(words)
const originalText = text
// text = text.toLowerCase().replace(new RegExp(SEPARATORS, 'gu'), ' ')
@@ -199,4 +200,3 @@ export function escapeHTML(html: string): string {
.replaceAll('"', '"')
.replaceAll("'", ''')
}