Index: lib/filterClasses.js |
=================================================================== |
--- a/lib/filterClasses.js |
+++ b/lib/filterClasses.js |
@@ -865,18 +865,20 @@ |
* request |
* @param {string} [sitekey] public key provided by the document |
* @return {boolean} true in case of a match |
*/ |
matches(location, typeMask, docDomain, thirdParty, sitekey) |
{ |
return (this.contentType & typeMask) != 0 && |
(this.thirdParty == null || this.thirdParty == thirdParty) && |
- this.matchesLocation(location) && |
- this.isActiveOnDomain(docDomain, sitekey); |
+ (this.regexp ? (this.isActiveOnDomain(docDomain, sitekey) && |
+ this.matchesLocation(location)) : |
+ (this.matchesLocation(location) && |
+ this.isActiveOnDomain(docDomain, sitekey))); |
}, |
/** |
* Checks whether the given URL matches this filter's pattern. |
* @param {string} location The URL to check. |
* @param {?string} [lowerCaseLocation] The lower-case version of the URL to |
* check, for case-insensitive matching. |
* @returns {boolean} <code>true</code> if the URL matches. |