Skip to content

Commit

Permalink
feat(dropdown): check highlight settings before reverting mark html n…
Browse files Browse the repository at this point in the history
…ode encoding
  • Loading branch information
lubber-de committed Dec 15, 2023
1 parent 8610461 commit 02ef612
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/definitions/modules/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -1480,8 +1480,10 @@
if (shouldEscape.test(string)) {
string = string.replace(/&(?![\d#a-z]{1,12};)/gi, '&');
string = string.replace(badChars, escapedChar);
// FUI controlled HTML is still allowed
string = string.replace(/&lt;(\/)*mark&gt;/g, '<$1mark>');
if (settings.highlightMatches) {
// FUI controlled HTML is still allowed
string = string.replace(/&lt;(\/)*mark&gt;/g, '<$1mark>');
}
}

return string;
Expand Down

0 comments on commit 02ef612

Please sign in to comment.