Skip to content

Commit 9e2c08f

Browse files
author
Jan Petr
authored
Merge pull request #984 from algolia/escape_suggestions
Escape suggestions
2 parents aac1f8a + 720bd00 commit 9e2c08f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

js/algoliasearch/internals/frontend/common.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,9 @@ document.addEventListener("DOMContentLoaded", function (e) {
230230
} else {
231231
hit.url = algoliaConfig.baseUrl + '/catalogsearch/result/?q=' + hit.query;
232232
}
233+
234+
var toEscape = hit._highlightResult.query.value;
235+
hit._highlightResult.query.value = algoliaBundle.autocomplete.escapeHighlightedString(toEscape);
233236

234237
return algoliaConfig.autocomplete.templates.suggestions.render(hit);
235238
}

0 commit comments

Comments
 (0)