mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-06 19:02:30 +01:00
fix #2664
This commit is contained in:
parent
1a6f8266cc
commit
c7a9befdab
@ -108,8 +108,13 @@ var fromCosmeticFilter = function(details) {
|
|||||||
prefix = match[0],
|
prefix = match[0],
|
||||||
filter = details.rawFilter.slice(prefix.length);
|
filter = details.rawFilter.slice(prefix.length);
|
||||||
|
|
||||||
var compiled = JSON.stringify(filter),
|
var compiled = JSON.stringify(filter).slice(1, -1),
|
||||||
reFilter = new RegExp('(^|\\n).*?' + reEscape(compiled) + '.*?(\\n|$)', 'g');
|
reFilter = new RegExp(
|
||||||
|
'(?:^|\\n)[^\\n]*?("|\\")?' +
|
||||||
|
reEscape(compiled) +
|
||||||
|
'\\1[^\\n]*?(?:\\n|$)',
|
||||||
|
'g'
|
||||||
|
);
|
||||||
|
|
||||||
var reHostname = new RegExp(
|
var reHostname = new RegExp(
|
||||||
'^' +
|
'^' +
|
||||||
|
Loading…
Reference in New Issue
Block a user