[mv3] Fix incorrect hostname matching in urlskip-related code

Related feedback:
https://github.com/uBlockOrigin/uBOL-home/issues/278#issuecomment-2664971115
This commit is contained in:
Raymond Hill 2025-02-19 08:41:22 -05:00
parent f12351688a
commit 17c66030fe
No known key found for this signature in database
GPG key ID: 25E1490B761470C2

View file

@ -243,7 +243,7 @@ function fragmentFromTemplate(template, placeholder, text, details) {
const urlskipLists = await Promise.all(toFetch);
const toHn = toURL.hostname;
const matchesHn = hn => {
if ( hn.endsWith(toHn) === false ) { return false; }
if ( toHn.endsWith(hn) === false ) { return false; }
if ( hn.length === toHn.length ) { return true; }
return toHn.charAt(toHn.length - hn.length - 1) === '.';
};