diff options
author | Max Kostikov <max@kostikov.co> | 2021-10-14 13:16:16 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2021-10-14 13:16:16 +0000 |
commit | 99873504e4bc568281d5a978a6521edf3caf3da4 (patch) | |
tree | eca6b491d23d803bdf3adeeeb80b01edd9069976 /Zotlabs/Module/Linkinfo.php | |
parent | 8ac529f5aec365f6e65c3539779b62cedbd39a28 (diff) | |
download | volse-hubzilla-99873504e4bc568281d5a978a6521edf3caf3da4.tar.gz volse-hubzilla-99873504e4bc568281d5a978a6521edf3caf3da4.tar.bz2 volse-hubzilla-99873504e4bc568281d5a978a6521edf3caf3da4.zip |
Support IDNA URLs embedding
Diffstat (limited to 'Zotlabs/Module/Linkinfo.php')
-rw-r--r-- | Zotlabs/Module/Linkinfo.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Zotlabs/Module/Linkinfo.php b/Zotlabs/Module/Linkinfo.php index a05575cb6..038c739d5 100644 --- a/Zotlabs/Module/Linkinfo.php +++ b/Zotlabs/Module/Linkinfo.php @@ -29,6 +29,9 @@ class Linkinfo extends \Zotlabs\Web\Controller { if((substr($url,0,1) != '/') && (substr($url,0,4) != 'http')) $url = 'http://' . $url; + $x = parse_url($url); + if ($x) + $url = str_replace($x['host'], punify($x['host']), $url); if($_GET['title']) $title = strip_tags(trim($_GET['title'])); |