From d7aea27f1967f23cbaee16c67bd6618971e8d1af Mon Sep 17 00:00:00 2001 From: gorhill Date: Thu, 26 Mar 2015 15:16:48 -0400 Subject: [PATCH] merged #1096 fixes --- platform/chromium/manifest.json | 2 +- platform/opera/manifest.json | 2 +- src/js/static-net-filtering.js | 11 +++++++++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/platform/chromium/manifest.json b/platform/chromium/manifest.json index 610fd0319..31a72cefd 100644 --- a/platform/chromium/manifest.json +++ b/platform/chromium/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 2, "name": "uBlock", - "version": "0.9.2.3", + "version": "0.9.2.4", "default_locale": "en", "description": "__MSG_extShortDesc__", diff --git a/platform/opera/manifest.json b/platform/opera/manifest.json index 2d5d2d2e3..2500a4c1c 100644 --- a/platform/opera/manifest.json +++ b/platform/opera/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 2, "name": "uBlock", - "version": "0.9.2.2", + "version": "0.9.2.4", "default_locale": "en", "description": "__MSG_extShortDesc__", diff --git a/src/js/static-net-filtering.js b/src/js/static-net-filtering.js index dbcce5fc1..29c3789f8 100644 --- a/src/js/static-net-filtering.js +++ b/src/js/static-net-filtering.js @@ -165,6 +165,11 @@ var isFirstParty = function(firstPartyDomain, hostname) { }; var alwaysTruePseudoRegex = { + match: { '0': '', index: 0 }, + exec: function(s) { + this.match['0'] = s; + return this.match; + }, test: function() { return true; } @@ -1381,6 +1386,12 @@ FilterParser.prototype.parse = function(raw) { //console.debug('µBlock.staticNetFilteringEngine/FilterParser.parse():', raw, '=', s); } } + + // https://github.com/gorhill/uBlock/issues/1096 + if ( s.charAt(0) === '^' ) { + this.unsupported = true; + return this; + } } // left-anchored