From 1ac9c5ceb7d1d9c153428591f0f1dd8751867b79 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Wed, 24 Nov 2021 18:14:09 -0500 Subject: [PATCH] Reject generic HTML block filters Related feedback: - https://github.com/uBlockOrigin/uBlock-issues/issues/1844 Generic HTML block filters will by highlighted as invalid and rejected by uBO at compile time. --- src/js/static-filtering-parser.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/js/static-filtering-parser.js b/src/js/static-filtering-parser.js index 4e0bf3f0d..bcb81e6fa 100644 --- a/src/js/static-filtering-parser.js +++ b/src/js/static-filtering-parser.js @@ -324,6 +324,9 @@ const Parser = class { } this.flavorBits |= BITFlavorExtHTML; selector = selector.slice(1); + if ( (this.hasOptions() || this.isException()) === false ) { + this.flavorBits |= BITFlavorUnsupported; + } } // ##... else {