X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/d4b44755215a40dd163753719e539bf84124587d..ffb27000431f744f2cec9d198d0a0d8cbb0bd405:/IkiWiki/CGI.pm
diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm
index b031aef56..d29151ace 100644
--- a/IkiWiki/CGI.pm
+++ b/IkiWiki/CGI.pm
@@ -654,7 +654,12 @@ sub userlink ($) { #{{{
eval q{use Net::OpenID::VerifiedIdentity; 1} && !$@) {
# Munge user-urls, as used by eg, OpenID.
my $oid=Net::OpenID::VerifiedIdentity->new(identity => $user);
- return "".escapeHTML($oid->display)."";
+ my $display=$oid->display;
+ # Convert "user.somehost.com" to "user [somehost.com]".
+ if ($display !~ /\[/) {
+ $display=~s/^(.*?)\.([^.]+\.[a-z]+)$/$1 [$2]/;
+ }
+ return "".escapeHTML($display)."";
}
else {
return htmllink("", "", escapeHTML($user), 1);