From 3dcfc302e4da6e761d94e9846d96b980a3fcb304 Mon Sep 17 00:00:00 2001 From: gorhill Date: Wed, 8 Nov 2017 13:29:04 -0500 Subject: [PATCH] fix https://github.com/gorhill/uBlock/issues/3208#issuecomment-342900031 --- src/js/traffic.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/js/traffic.js b/src/js/traffic.js index 97fb2e9b7..95ea2f293 100644 --- a/src/js/traffic.js +++ b/src/js/traffic.js @@ -302,11 +302,13 @@ var onBeforeRootFrameRequest = function(details) { /******************************************************************************/ +// https://github.com/gorhill/uBlock/issues/3208 +// Mind case insensitivity. var toBlockDocResult = function(url, hostname, logData) { if ( typeof logData.regex !== 'string' ) { return; } - var re = new RegExp(logData.regex), + var re = new RegExp(logData.regex, 'i'), match = re.exec(url.toLowerCase()); - if ( match === null ) { return ''; } + if ( match === null ) { return false; } // https://github.com/chrisaljoudi/uBlock/issues/1128 // https://github.com/chrisaljoudi/uBlock/issues/1212