summaryrefslogtreecommitdiffstats
path: root/extensions/ProdCompSearch
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/ProdCompSearch')
-rw-r--r--extensions/ProdCompSearch/web/js/prod_comp_search.js6
1 files changed, 1 insertions, 5 deletions
diff --git a/extensions/ProdCompSearch/web/js/prod_comp_search.js b/extensions/ProdCompSearch/web/js/prod_comp_search.js
index 69cc7cc0b..efbaab81b 100644
--- a/extensions/ProdCompSearch/web/js/prod_comp_search.js
+++ b/extensions/ProdCompSearch/web/js/prod_comp_search.js
@@ -99,11 +99,7 @@ $(function() {
},
formatResult: function(suggestion, currentValue) {
var value = (suggestion.data.component ? suggestion.data.component : suggestion.data.product);
- var escaped = value
- .replace(/&/g, '&')
- .replace(/</g, '&lt;')
- .replace(/>/g, '&gt;')
- .replace(/"/g, '&quot;');
+ var escaped = value.htmlEncode();
if (suggestion.data.component) {
return '-&nbsp;' + escaped;
}