Do not UTF8-escape "/" in Git's diffurl: cgit does not support this.
[ikiwiki.git] / IkiWiki / Plugin / git.pm
index 77c0678bcbd8dfd32c13b164477ea899d0c9f38a..9e67a36ee79465303b7983b9a4e44b6f7388b704 100644 (file)
@@ -660,7 +660,9 @@ sub rcs_recentchanges ($) {
                my @pages;
                foreach my $detail (@{ $ci->{'details'} }) {
                        my $file = $detail->{'file'};
-                       my $efile = uri_escape_utf8($file);
+                       my $efile = join('/',
+                               map { uri_escape_utf8($_) } split('/', $file)
+                       );
 
                        my $diffurl = defined $config{'diffurl'} ? $config{'diffurl'} : "";
                        $diffurl =~ s/\[\[file\]\]/$efile/go;