fix: Ensure highlighting matches HTML-escaped text in excerpts
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
This commit is contained in:
@@ -25,7 +25,9 @@ export class TextProcessor {
|
||||
try {
|
||||
return text.replace(
|
||||
new RegExp(
|
||||
`(${matches.map(item => escapeRegExp(item.match)).join('|')})`,
|
||||
`(${matches
|
||||
.map(item => escapeRegExp(escapeHTML(item.match)))
|
||||
.join('|')})`,
|
||||
'giu'
|
||||
),
|
||||
`<span class="${highlightClass}">$1</span>`
|
||||
|
||||
Reference in New Issue
Block a user