]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/CGI.pm
remove \n from gettexed string, and unfuzzy
[ikiwiki.git] / IkiWiki / CGI.pm
index d23cf5d02236e059255e1f72e292e5ccee11ab2f..85fc1a38614b17ce38984a597319306140eba2ea 100644 (file)
@@ -46,6 +46,8 @@ sub page_locked ($$;$) { #{{{
                if (pagespec_match($page, userinfo_get($admin, "locked_pages"))) {
                        return 1 if $nonfatal;
 
+                       #translators: The first parameter is a page name,
+                       #translators: second is the user who locked it.
                        error(sprintf(gettext("%s is locked by %s and cannot be edited"),
                                htmllink("", "", $page, 1),
                                userlink($admin)));
@@ -668,7 +670,7 @@ sub userlink ($) { #{{{
                }
                # Convert "http://somehost.com/user" to "user [somehost.com]".
                if ($display !~ /\[/) {
-                       $display=~s/^https?:\/\/(.+)\/[^\/](.+)$/$2 [$1]/;
+                       $display=~s/^https?:\/\/(.+)\/([^\/]+)$/$2 [$1]/;
                }
                $display=~s!^https?://!!; # make sure this is removed
                return "<a href=\"$user\">".escapeHTML($display)."</a>";