Skip to content

Commit

Permalink
Fix regression in highlighting quicksearch results
Browse files Browse the repository at this point in the history
escapeHTML() is needed, since the data to search is necessarily already
HTML encoded (or else it would be impossible to add the SPAN tags).

This broke searches for things like, for example, '<foo>'.
  • Loading branch information
slusarz committed Nov 13, 2014
1 parent 1f78a5e commit e5781ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion imp/js/dimpbase.js
Expand Up @@ -552,7 +552,7 @@ var DimpBase = {

if (highlight && this.isQSearch()) {
r[h] = r[h].gsub(
new RegExp("(" + RegExp.escape($F('horde-search-input')) + ")", "i"),
new RegExp("(" + RegExp.escape($F('horde-search-input').escapeHTML()) + ")", "i"),
'<span class="qsearchMatch">#{1}</span>'
);
}
Expand Down

0 comments on commit e5781ba

Please sign in to comment.