This commit is contained in:
gorhill 2017-10-06 13:35:45 -04:00
parent c49ba60f0b
commit 4639d75896
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
1 changed files with 5 additions and 3 deletions

View File

@ -100,11 +100,13 @@ var fromCosmeticFilter = function(details) {
prefix = match[0],
filter = details.rawFilter.slice(prefix.length);
// https://github.com/gorhill/uBlock/issues/3101
// Use `m` flag for efficient regex execution.
var reFilter = new RegExp(
'[^\\n]*\\\\*"' +
'^\\[\\d,[^\\n]*\\\\*"' +
reEscapeCosmetic(filter) +
'\\\\*"[^\\n]*',
'g'
'\\\\*"[^\\n]*\\]$',
'gm'
);
var reHostname = new RegExp(