From 39d78ce54c179aa02974eb7c112c6a8b62d74dd0 Mon Sep 17 00:00:00 2001 From: joey Date: Sun, 31 Dec 2006 22:28:08 +0000 Subject: [PATCH] deal with http:// part --- IkiWiki/CGI.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm index 83ed959c0..d23cf5d02 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).""; -- 2.26.2