Merge remote-tracking branch 'origin/master' into iots_to_zod

This commit is contained in:
Dragory 2024-01-27 14:12:06 +02:00
commit 59c5176cbd
No known key found for this signature in database
39 changed files with 1420 additions and 2208 deletions

View file

@ -522,7 +522,13 @@ export function getUrlsInString(str: string, onlyUnique = false): MatchedURL[] {
return urls;
}
const hostnameParts = matchUrl.hostname.split(".");
let hostname = matchUrl.hostname.toLowerCase();
if (hostname.length > 3) {
hostname = hostname.replace(/[^a-z]+$/, "");
}
const hostnameParts = hostname.split(".");
const tld = hostnameParts[hostnameParts.length - 1];
if (tlds.includes(tld)) {
urls.push(matchUrl);