mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-10 09:07:54 +01:00
fix #2664
This commit is contained in:
parent
1a6f8266cc
commit
c7a9befdab
1 changed files with 7 additions and 2 deletions
|
@ -108,8 +108,13 @@ var fromCosmeticFilter = function(details) {
|
|||
prefix = match[0],
|
||||
filter = details.rawFilter.slice(prefix.length);
|
||||
|
||||
var compiled = JSON.stringify(filter),
|
||||
reFilter = new RegExp('(^|\\n).*?' + reEscape(compiled) + '.*?(\\n|$)', 'g');
|
||||
var compiled = JSON.stringify(filter).slice(1, -1),
|
||||
reFilter = new RegExp(
|
||||
'(?:^|\\n)[^\\n]*?("|\\")?' +
|
||||
reEscape(compiled) +
|
||||
'\\1[^\\n]*?(?:\\n|$)',
|
||||
'g'
|
||||
);
|
||||
|
||||
var reHostname = new RegExp(
|
||||
'^' +
|
||||
|
|
Loading…
Reference in a new issue