Skip to content

Commit

Permalink
Merge pull request #3072 from mxbeer/bugfix/favicon-www-hostname
Browse files Browse the repository at this point in the history
respect www subdomain when fetching website favicon
  • Loading branch information
mikecao authored Nov 27, 2024
2 parents b5f5f07 + 83af7fa commit bf89dfd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/common/Favicon.tsx
Original file line number Diff line number Diff line change
@@ -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;
}

Expand Down

0 comments on commit bf89dfd

Please sign in to comment.