]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/svn.pm
Electric's userpage
[git.ikiwiki.info.git] / IkiWiki / Plugin / svn.pm
index 8824a6ce0a60311cac8ec304258b545e661eea83..c46a52dcf398a0a65a333414a795563e2e440b0f 100644 (file)
@@ -5,6 +5,7 @@ use warnings;
 use strict;
 use IkiWiki;
 use POSIX qw(setlocale LC_CTYPE);
+use URI::Escape q{uri_escape_utf8};
 
 sub import {
        hook(type => "checkconfig", id => "svn", call => \&checkconfig);
@@ -146,12 +147,12 @@ sub commitmessage (@) {
        if (defined $params{session}) {
                if (defined $params{session}->param("name")) {
                        return "web commit by ".
-                               $params{session}->param("name").
+                               IkiWiki::cloak($params{session}->param("name")).
                                (length $params{message} ? ": $params{message}" : "");
                }
                elsif (defined $params{session}->remote_addr()) {
                        return "web commit from ".
-                               $params{session}->remote_addr().
+                               IkiWiki::cloak($params{session}->remote_addr()).
                                (length $params{message} ? ": $params{message}" : "");
                }
        }
@@ -292,7 +293,8 @@ sub rcs_recentchanges ($) {
                        }
 
                        my $diffurl=defined $config{diffurl} ? $config{diffurl} : "";
-                       $diffurl=~s/\[\[file\]\]/$file/g;
+                       my $efile = uri_escape_utf8($file);
+                       $diffurl=~s/\[\[file\]\]/$efile/g;
                        $diffurl=~s/\[\[r1\]\]/$rev - 1/eg;
                        $diffurl=~s/\[\[r2\]\]/$rev/g;