fix #1691 (regression from a7fe367eec)

This commit is contained in:
gorhill 2016-10-30 15:54:05 -04:00
parent 3f8c7b915c
commit 015d38dc8c
1 changed files with 2 additions and 2 deletions

View File

@ -141,7 +141,7 @@ var fromCosmeticFilter = function(details) {
if ( hostname !== '' ) {
for ( ;; ) {
candidates[hostname + '##' + filter] = new RegExp(
['c', 'h', '\\w+', reEscape(hostname), reEscape(filter)].join('\\v') +
['c', 'h', '[^\\v]+', reEscape(hostname), reEscape(filter)].join('\\v') +
'(?:\\n|$)'
);
pos = hostname.indexOf('.');
@ -159,7 +159,7 @@ var fromCosmeticFilter = function(details) {
if ( pos !== -1 ) {
var entity = domain.slice(0, pos) + '.*';
candidates[entity + '##' + filter] = new RegExp(
['c', 'h', '\\w+', reEscape(entity), reEscape(filter)].join('\\v') +
['c', 'h', '[^\\v]+', reEscape(entity), reEscape(filter)].join('\\v') +
'(?:\\n|$)'
);
}