mirror of https://github.com/gorhill/uBlock.git
fix #3101
This commit is contained in:
parent
c49ba60f0b
commit
4639d75896
|
@ -100,11 +100,13 @@ var fromCosmeticFilter = function(details) {
|
||||||
prefix = match[0],
|
prefix = match[0],
|
||||||
filter = details.rawFilter.slice(prefix.length);
|
filter = details.rawFilter.slice(prefix.length);
|
||||||
|
|
||||||
|
// https://github.com/gorhill/uBlock/issues/3101
|
||||||
|
// Use `m` flag for efficient regex execution.
|
||||||
var reFilter = new RegExp(
|
var reFilter = new RegExp(
|
||||||
'[^\\n]*\\\\*"' +
|
'^\\[\\d,[^\\n]*\\\\*"' +
|
||||||
reEscapeCosmetic(filter) +
|
reEscapeCosmetic(filter) +
|
||||||
'\\\\*"[^\\n]*',
|
'\\\\*"[^\\n]*\\]$',
|
||||||
'g'
|
'gm'
|
||||||
);
|
);
|
||||||
|
|
||||||
var reHostname = new RegExp(
|
var reHostname = new RegExp(
|
||||||
|
|
Loading…
Reference in New Issue