X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/c494e2f97461b5b524607cef88657e0bb89add25..e5348d2d70cf7a56f59f019b4adfbd4324212305:/IkiWiki/CGI.pm?ds=sidebyside diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm index 83ed959c0..5d21d0674 100644 --- a/IkiWiki/CGI.pm +++ b/IkiWiki/CGI.pm @@ -666,9 +666,9 @@ sub userlink ($) { #{{{ if ($display !~ /\[/) { $display=~s/^(.*?)\.([^.]+\.[a-z]+)$/$1 [$2]/; } - # Convert "somehost.com/user" to "user [somehost.com]". + # Convert "http://somehost.com/user" to "user [somehost.com]". if ($display !~ /\[/) { - $display=~s/^(.+)\/[^\/](.+)$/$2 [$1]/; + $display=~s/^https?:\/\/(.+)\/([^\/]+)$/$2 [$1]/; } $display=~s!^https?://!!; # make sure this is removed return "".escapeHTML($display)."";