]> sipb.mit.edu Git - ikiwiki.git/commitdiff
deal with http:// part
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Sun, 31 Dec 2006 22:28:08 +0000 (22:28 +0000)
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Sun, 31 Dec 2006 22:28:08 +0000 (22:28 +0000)
IkiWiki/CGI.pm

index 83ed959c02a9d1d7d90fdc1ec8195f76f1608703..d23cf5d02236e059255e1f72e292e5ccee11ab2f 100644 (file)
@@ -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 "<a href=\"$user\">".escapeHTML($display)."</a>";