Fix broken reverse lookup of filter lists

Related feedback:
https://github.com/uBlockOrigin/uBlock-issues/discussions/3684

Regression from:
8b696a691a
This commit is contained in:
Raymond Hill 2025-06-22 08:05:34 -04:00
parent 8d24b7130c
commit 527b4a201f
No known key found for this signature in database
GPG key ID: 25E1490B761470C2

View file

@ -163,7 +163,7 @@ const fromExtendedFilter = function(details) {
const regexTargetMatchesURL = target => {
const pathPos = target.indexOf('\\/');
if ( pathPos === -1 ) {
return regexTargetMatchesHostname(target.slice(1, -1));
return regexTargetMatchesHostname(target);
}
return regexTargetMatchesHostname(`${target.slice(1, pathPos)}$`) &&
(new RegExp(`^${target.slice(pathPos, -1)}`)).test(pathname);