From 51a6c8beba264d5dcf40841615db88fa19c8fa2e Mon Sep 17 00:00:00 2001 From: gorhill Date: Fri, 13 Feb 2015 18:59:51 -0500 Subject: [PATCH] trivial test to workaround potential bad filters --- src/js/static-net-filtering.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/js/static-net-filtering.js b/src/js/static-net-filtering.js index b22cd0a59..4958bbb6f 100644 --- a/src/js/static-net-filtering.js +++ b/src/js/static-net-filtering.js @@ -1538,6 +1538,12 @@ FilterParser.prototype.parse = function(s) { s = trimChar(s, '*'); } + // nothing left? + if ( s === '' ) { + this.unsupported = true; + return this; + } + // plain hostname? this.hostnamePure = this.hostnameAnchored && reHostnameRule.test(s);