mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-07-06 18:47:20 +00:00
remove trailing dot from FQDN for TLD check
Signed-off-by: GitHub <noreply@github.com>
This commit is contained in:
parent
047ab872df
commit
9dce492de4
1 changed files with 3 additions and 1 deletions
|
@ -647,7 +647,9 @@ export function getUrlsInString(str: string, onlyUnique = false): MatchedURL[] {
|
|||
return urls;
|
||||
}
|
||||
|
||||
const hostnameParts = matchUrl.hostname.split(".");
|
||||
const hostname = matchUrl.hostname.endsWith(".") ? matchUrl.hostname.slice(0, -1) : matchUrl.hostname;
|
||||
|
||||
const hostnameParts = hostname.split(".");
|
||||
const tld = hostnameParts[hostnameParts.length - 1];
|
||||
if (tlds.includes(tld)) {
|
||||
urls.push(matchUrl);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue