The function is now usable for all formats

This commit is contained in:
Michael 2022-05-11 06:58:26 +00:00
parent 695e3d8b61
commit 020ba7a4ed

View file

@ -474,10 +474,12 @@ class Network
if (!empty($parts['scheme']) && !empty($parts['host'])) {
$parts['host'] = idn_to_ascii($parts['host']);
$uri = self::unparseURL($parts);
} elseif (strstr($uri, '@')) {
} else {
$parts = explode('@', $uri);
if (count($parts) == 2) {
$uri = $parts[0] . '@' . idn_to_ascii($parts[1]);
} else {
$uri = idn_to_ascii($uri);
}
}