diff --git a/frontend/src/ts/components/modals/QuoteSearchModal.tsx b/frontend/src/ts/components/modals/QuoteSearchModal.tsx index 5f262217d975..fa0fee84e2f4 100644 --- a/frontend/src/ts/components/modals/QuoteSearchModal.tsx +++ b/frontend/src/ts/components/modals/QuoteSearchModal.tsx @@ -129,8 +129,9 @@ function Item(props: { class="text-text [&_.highlight]:text-main" dir="auto" // oxlint-disable-next-line solid/no-innerhtml - innerHTML={Misc.escapeHTML( - highlightMatches(props.quote.text, props.matchedTerms), + innerHTML={highlightMatches( + Misc.escapeHTML(props.quote.text), + props.matchedTerms, )} >
@@ -139,8 +140,9 @@ function Item(props: {
@@ -154,8 +156,9 @@ function Item(props: { @@ -291,7 +294,10 @@ export function QuoteSearchModal(): JSXElement { ]; } - setSearchResults({ quotes: matches, matchedTerms: matchedQueryTerms }); + setSearchResults({ + quotes: matches, + matchedTerms: matchedQueryTerms.map(Misc.escapeHTML), + }); }; const filteredQuotes = (): Quote[] => {