]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/openid.pm
po: require ikiwiki plugin interface 3.0
[git.ikiwiki.info.git] / IkiWiki / Plugin / openid.pm
index 4acfecf5efe44a9d82b2042de03b51b06263f9ad..5424c57e2c6f8e8093eb56d1aba6aee696a05b39 100644 (file)
@@ -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'};