From f454304f2750eb797b0e9683a87c1bdd354b1b17 Mon Sep 17 00:00:00 2001 From: mrmr1993 Date: Sun, 15 Sep 2013 07:08:58 +0100 Subject: Highlight escaped HTML in Vomnibar results (fixes #914) --- background_scripts/completion.coffee | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'background_scripts/completion.coffee') 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 . 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 -- cgit v1.2.3