respect www subdomain when fetching website favicon

This commit is contained in:
Max Beer 2024-11-26 13:20:48 +01:00
parent 1c377bcdc3
commit 83af7fa18a

View File

@ -1,5 +1,5 @@
function getHostName(url: string) {
const match = url.match(/^(?:https?:\/\/)?(?:[^@\n]+@)?(?:www\.)?([^:/\n?=]+)/im);
const match = url.match(/^(?:https?:\/\/)?(?:[^@\n]+@)?([^:/\n?=]+)/im);
return match && match.length > 1 ? match[1] : null;
}