| Index: lib/filterClasses.js |
| diff --git a/lib/filterClasses.js b/lib/filterClasses.js |
| index ebfe551604cf296e582fbd6e7cdeca87bbe66237..899b0c69ad3749603cb86363f1fd2428d1fc96f8 100644 |
| --- a/lib/filterClasses.js |
| +++ b/lib/filterClasses.js |
| @@ -924,6 +924,12 @@ ElemHideBase.fromText = function(text, domain, isException, tagName, attrRules, |
| return new InvalidFilter(text, "filter_elemhide_nocriteria"); |
| } |
| + // We don't allow ElemHide filters which have any empty domains. |
| + // Note: The ElemHide.prototype.domainSeparator is duplicated here, if that |
| + // changes this must be changed too. |
| + if (domain && /(^|,)~?(,|$)/.test(domain)) |
| + return new InvalidFilter(text, "filter_invalid_domain"); |
| + |
| if (isException) |
| return new ElemHideException(text, domain, selector); |