diff --git a/src/js/reverselookup-worker.js b/src/js/reverselookup-worker.js index e8dedb915..8d04148fc 100644 --- a/src/js/reverselookup-worker.js +++ b/src/js/reverselookup-worker.js @@ -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(