From c3c92f85ff569d0601c3fec67d932abde189e1f4 Mon Sep 17 00:00:00 2001 From: gorhill Date: Wed, 7 Dec 2016 20:18:58 -0500 Subject: [PATCH] fix #2225 --- src/js/static-net-filtering.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/js/static-net-filtering.js b/src/js/static-net-filtering.js index d62036bbe..4d6550b4b 100644 --- a/src/js/static-net-filtering.js +++ b/src/js/static-net-filtering.js @@ -2201,6 +2201,10 @@ FilterContainer.prototype.matchTokens = function(bucket, url) { FilterContainer.prototype.matchStringGenericHide = function(context, requestURL) { var url = this.urlTokenizer.setURL(requestURL); + // https://github.com/gorhill/uBlock/issues/2225 + // Important: this is used by FilterHostnameDict.match(). + requestHostnameRegister = µb.URI.hostnameFromURI(url); + var bucket = this.categories.get(toHex(genericHideException)); if ( !bucket || this.matchTokens(bucket, url) === false ) { this.fRegister = null; @@ -2282,7 +2286,7 @@ FilterContainer.prototype.matchStringExactType = function(context, requestURL, r // If there is no block filter, no need to test against allow filters if ( this.fRegister === null ) { - return undefined; + return; } // Test against allow filters @@ -2419,7 +2423,7 @@ FilterContainer.prototype.matchString = function(context) { // If there is no block filter, no need to test against allow filters if ( this.fRegister === null ) { - return undefined; + return; } // Test against allow filters