diff options
Diffstat (limited to 'background_scripts')
| -rw-r--r-- | background_scripts/completion.coffee | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/background_scripts/completion.coffee b/background_scripts/completion.coffee index 92e325e1..8b30dc43 100644 --- a/background_scripts/completion.coffee +++ b/background_scripts/completion.coffee @@ -71,7 +71,9 @@ class Suggestion # Wraps each occurence of the query terms in the given string in a <span>. highlightTerms: (string) -> ranges = [] - for term in @queryTerms + # Escape the terms before highlighting + escapedTerms = @queryTerms.map (oldTerm) -> Utils.escapeHtml(oldTerm) + for term in escapedTerms @pushMatchingRanges string, term, ranges return string if ranges.length == 0 |
