1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-09-14 23:12:28 +02:00
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

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(