trivial test to workaround potential bad filters

This commit is contained in:
gorhill 2015-02-13 18:59:51 -05:00
parent 94dd2b3d86
commit 51a6c8beba
1 changed files with 6 additions and 0 deletions

View File

@ -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);