pl-fe: make host visibility check case insensitive
Signed-off-by: Nicole Mikołajczyk <git@mkljczk.pl>
This commit is contained in:
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user