pl-fe: make host visibility check case insensitive

Signed-off-by: Nicole Mikołajczyk <git@mkljczk.pl>
This commit is contained in:
Nicole Mikołajczyk
2025-04-19 01:15:40 +02:00
parent 2f5dc22072
commit ef52459bb3

View File

@ -29,7 +29,7 @@ const isHostNotVisible = (href: string, nodes: Array<DOMNode>): false | string =
host = host.replace(/^www\./, '');
const text = nodesToText(nodes).trim();
if (new RegExp(`^(https?://)?(www.)?${host}(/|$)`).test(text)) {
if (new RegExp(`^(https?://)?(www.)?${host}(/|$)`, 'i').test(text)) {
return false;
} else {
return host;