Skip to content

Commit

Permalink
fix #3101
Browse files Browse the repository at this point in the history
  • Loading branch information
gorhill committed Oct 6, 2017
1 parent c49ba60 commit 4639d75
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/js/reverselookup-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 4639d75

Please sign in to comment.