aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorgorhill <rhill@raymondhill.net>2015-09-13 14:59:33 -0400
committergorhill <rhill@raymondhill.net>2015-09-13 14:59:33 -0400
commitce12fdba0115a3646f26f72cdaf08011faae7eab (patch)
treeec6103d200fb9e75c3e42bc2153471369e88925e /src
parentf5bb9cec694c287f30aa612bee32288aa77ad475 (diff)
downloaduBlock-ce12fdba0115a3646f26f72cdaf08011faae7eab.zip
uBlock-ce12fdba0115a3646f26f72cdaf08011faae7eab.tar.gz
uBlock-ce12fdba0115a3646f26f72cdaf08011faae7eab.tar.bz2
update reverse lookup code to deal with #711
Diffstat (limited to 'src')
-rw-r--r--src/js/reverselookup-worker.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/js/reverselookup-worker.js b/src/js/reverselookup-worker.js
index e04ce81..b82f9ea 100644
--- a/src/js/reverselookup-worker.js
+++ b/src/js/reverselookup-worker.js
@@ -103,11 +103,10 @@ var fromCosmeticFilter = function(details) {
var matches = rePlainSelector.exec(filter);
if ( matches ) {
if ( matches[0] === filter ) { // simple CSS selector
- reStr = rescape('c\vlg\v');
+ reStr = rescape('c\vlg\v' + filter);
} else { // complex CSS selector
- reStr = rescape('c\vlg+\v');
+ reStr = rescape('c\vlg+\v' + matches[0] + '\v' + filter);
}
- reStr += '\\w+' + rescape('\v' + filter);
} else if ( reHighLow.test(filter) ) { // [alt] or [title]
reStr = rescape('c\vhlg0\v' + filter);
} else if ( reHighMedium.test(filter) ) { // [href^="..."]