]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/monotone.pm
document that checkcontent behaves differently for comments
[git.ikiwiki.info.git] / IkiWiki / Plugin / monotone.pm
index 1d89e3f6b1cd6d9fc887ae539a97b17301ac5e62..b0bba5661541843bb1440bffe5c466ae88dc238d 100644 (file)
@@ -7,6 +7,7 @@ use IkiWiki;
 use Monotone;
 use Date::Parse qw(str2time);
 use Date::Format qw(time2str);
+use URI::Escape q{uri_escape_utf8};
 
 my $sha1_pattern = qr/[0-9a-fA-F]{40}/; # pattern to validate sha1sums
 my $mtn_version = undef;
@@ -309,10 +310,10 @@ sub commitauthor (@) {
 
        if (defined $params{session}) {
                if (defined $params{session}->param("name")) {
-                       return "Web user: " . $params{session}->param("name");
+                       return "Web user: " . IkiWiki::cloak($params{session}->param("name"));
                }
                elsif (defined $params{session}->remote_addr()) {
-                       return "Web IP: " . $params{session}->remote_addr();
+                       return "Web IP: " . IkiWiki::cloak($params{session}->remote_addr());
                }
        }
        return "Web: Anonymous";
@@ -593,7 +594,8 @@ sub rcs_recentchanges ($) {
                                my $diffurl=$config{diffurl};
                                $diffurl=~s/\[\[r1\]\]/$parent/g;
                                $diffurl=~s/\[\[r2\]\]/$rev/g;
-                               $diffurl=~s/\[\[file\]\]/$file/g;
+                               my $efile = uri_escape_utf8($file);
+                               $diffurl=~s/\[\[file\]\]/$efile/g;
                                push @pages, {
                                        page => pagename($file),
                                        diffurl => $diffurl,