1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-10-06 09:37:12 +02:00
This commit is contained in:
gorhill 2017-08-30 19:03:02 -04:00
parent ab1b23a398
commit 73387e54ad
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -213,7 +213,7 @@ rawToRegexStr.escape1 = /[.+?${}()|[\]\\]/g;
rawToRegexStr.escape2 = /\^/g;
rawToRegexStr.escape3 = /^\*|\*$/g;
rawToRegexStr.escape4 = /\*/g;
rawToRegexStr.reTextHostnameAnchor = '^[a-z-]+://(?:[^/?#]+\\.)?';
rawToRegexStr.reTextHostnameAnchor = '^[a-z-]+://(?:[^/?#]+\\.?)?';
var filterFingerprinter = µb.CompiledLineWriter.fingerprint;
@ -624,8 +624,7 @@ FilterGenericHnAnchored.prototype.match = function(url) {
if ( this.re === null ) {
this.re = new RegExp(rawToRegexStr(this.s, this.anchor));
}
var matchStart = url.search(this.re);
return matchStart !== -1 && isHnAnchored(url, matchStart);
return this.re.test(url);
};
FilterGenericHnAnchored.prototype.reSourceOffset =