}
elsif ($do eq 'blog') {
my $page=titlepage(decode_utf8($q->param('title')));
+ $page=~s/(\/)/"__".ord($1)."__"/eg; # escape slashes too
# if the page already exists, munge it to be unique
my $from=$q->param('from');
my $add="";
if ($display !~ /\[/) {
$display=~s/^(.*?)\.([^.]+\.[a-z]+)$/$1 [$2]/;
}
+ # Convert "http://somehost.com/user" to "user [somehost.com]".
+ if ($display !~ /\[/) {
+ $display=~s/^https?:\/\/(.+)\/[^\/](.+)$/$2 [$1]/;
+ }
$display=~s!^https?://!!; # make sure this is removed
return "<a href=\"$user\">".escapeHTML($display)."</a>";
}