improve regexp

master
joey 2006-11-21 03:52:20 +00:00
parent fc0b70e700
commit a8c5c8c0ba
1 changed files with 1 additions and 1 deletions

View File

@ -657,7 +657,7 @@ sub userlink ($) { #{{{
my $display=$oid->display;
# Convert "user.somehost.com" to "user [somehost.com]".
if ($display !~ /\[/) {
$display=~s/^(.*?)\.([^.]+.[^.]+)$/$1 [$2]/;
$display=~s/^(.*?)\.([^.]+\.[a-z]+)$/$1 [$2]/;
}
return "<a href=\"$user\">".escapeHTML($display)."</a>";
}