]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/tla.pm
Add modified opengraph plugin.
[git.ikiwiki.info.git] / IkiWiki / Plugin / tla.pm
index da4385446412635d3b4843e4b439e07cd399195b..c2fffbcedba5a27cafb54fd686cbe6ae1f63b979 100644 (file)
@@ -4,6 +4,7 @@ package IkiWiki::Plugin::tla;
 use warnings;
 use strict;
 use IkiWiki;
+use URI::Escape q{uri_escape_utf8};
 
 sub import {
        hook(type => "checkconfig", id => "tla", call => \&checkconfig);
@@ -107,12 +108,12 @@ sub rcs_commit (@) {
        if (defined $params{session}) {
                if (defined $params{session}->param("name")) {
                        $message="web commit by ".
-                               $params{session}->param("name").
+                               IkiWiki::cloak($params{session}->param("name")).
                                (length $message ? ": $message" : "");
                }
                elsif (defined $params{session}->remote_addr()) {
                        $message="web commit from ".
-                               $params{session}->remote_addr().
+                               IkiWiki::cloak($params{session}->remote_addr()).
                                (length $message ? ": $message" : "");
                }
        }
@@ -224,7 +225,8 @@ sub rcs_recentchanges ($) {
 
                foreach my $file (@paths) {
                        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/\[\[rev\]\]/$change/g;
                        push @pages, {
                                page => pagename($file),