1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-07 03:12:33 +01:00

fix #1691 (regression from a7fe367eec)

This commit is contained in:
gorhill 2016-10-30 15:54:05 -04:00
parent 3f8c7b915c
commit 015d38dc8c

View File

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