]> git.mxchange.org Git - friendica.git/commitdiff
The function is now usable for all formats
authorMichael <heluecht@pirati.ca>
Wed, 11 May 2022 06:58:26 +0000 (06:58 +0000)
committerMichael <heluecht@pirati.ca>
Wed, 11 May 2022 06:58:26 +0000 (06:58 +0000)
src/Util/Network.php

index cdcb39a49605c2529e3de2f0d20b449deb9de44e..7d935d55f0d8af5e90c6bb2b899f24aa97ed5c76 100644 (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);
                        }
                }