Index: lib/filterClasses.js |
=================================================================== |
--- a/lib/filterClasses.js |
+++ b/lib/filterClasses.js |
@@ -80,17 +80,17 @@ |
* @type Object |
*/ |
Filter.knownFilters = Object.create(null); |
/** |
* Regular expression that element hiding filters should match |
* @type RegExp |
*/ |
-Filter.elemhideRegExp = /^([^\/\*\|\@"!]*?)#(\@)?(?:([\w\-]+|\*)((?:\([\w\-]+(?:[$^*]?=[^\(\)"]*)?\))*)|#([^{}]+))$/; |
+Filter.elemhideRegExp = /^([^\/\*\|\@"!]*?)#(\@)?(?:([\w\-]+|\*)((?:\([\w\-]+(?:[$^*]?=[^\(\)"]*)?\))*)|#((?:[^{}]|(?:\[[\w-]+[~|]?=(['"])[^'"]*?\6\]))+))$/; |
Wladimir Palant
2016/12/08 12:36:19
This won't consider escaped quotation marks proper
|
/** |
* Regular expression that RegExp filters specified as RegExps should match |
* @type RegExp |
*/ |
Filter.regexpRegExp = /^(@@)?\/.*\/(?:\$~?[\w\-]+(?:=[^,\s]+)?(?:,~?[\w\-]+(?:=[^,\s]+)?)*)?$/; |
/** |
* Regular expression that options on a RegExp filter should match |
* @type RegExp |