]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/tla.pm
URI escape filename when generating the diffurl.
[ikiwiki.git] / IkiWiki / Plugin / tla.pm
index da4385446412635d3b4843e4b439e07cd399195b..11be248e8da9d90fe050da1ad57f643a7ae0cdf1 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);
@@ -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),