diff options
| author | mrmr1993 | 2013-09-15 07:08:58 +0100 |
|---|---|---|
| committer | mrmr1993 | 2014-04-16 14:43:46 +0100 |
| commit | f454304f2750eb797b0e9683a87c1bdd354b1b17 (patch) | |
| tree | 24ba8155f40bbac164f90403fd53b5a44fc1906c /background_scripts/completion.coffee | |
| parent | 66a3ab3096e968342ceb9a52ba0f04094a6ea653 (diff) | |
| download | vimium-f454304f2750eb797b0e9683a87c1bdd354b1b17.tar.bz2 | |
Highlight escaped HTML in Vomnibar results (fixes #914)
Diffstat (limited to 'background_scripts/completion.coffee')
| -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 |
