X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/e0cd19f30b5cc66450bdb52bd9840c6d8fa774eb..724dbabc4aecf26f6c6899cea823a38a6c0f4375:/IkiWiki/Plugin/openid.pm?ds=sidebyside diff --git a/IkiWiki/Plugin/openid.pm b/IkiWiki/Plugin/openid.pm index 4acfecf5e..5424c57e2 100644 --- a/IkiWiki/Plugin/openid.pm +++ b/IkiWiki/Plugin/openid.pm @@ -4,7 +4,7 @@ package IkiWiki::Plugin::openid; use warnings; use strict; -use IkiWiki 2.00; +use IkiWiki 3.00; sub import { hook(type => "getopt", id => "openid", call => \&getopt); @@ -197,8 +197,9 @@ sub openiduser ($) { $display=~s/^([-a-zA-Z0-9]+?)\.([-.a-zA-Z0-9]+\.[a-z]+)$/$1 [$2]/; } # Convert "http://somehost.com/user" to "user [somehost.com]". + # (also "https://somehost.com/user/") if ($display !~ /\[/) { - $display=~s/^https?:\/\/(.+)\/([^\/]+)$/$2 [$1]/; + $display=~s/^https?:\/\/(.+)\/([^\/]+)\/?$/$2 [$1]/; } $display=~s!^https?://!!; # make sure this is removed eval q{use CGI 'escapeHTML'};