X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/db9f2b1b2b97fd92b09f170c3b567ec59030bf0a..2f8bafb70947e8b2d6b8b2882e32dde60faa9a27:/IkiWiki/Plugin/darcs.pm diff --git a/IkiWiki/Plugin/darcs.pm b/IkiWiki/Plugin/darcs.pm index cd4fcd0ff..646f65df1 100644 --- a/IkiWiki/Plugin/darcs.pm +++ b/IkiWiki/Plugin/darcs.pm @@ -3,6 +3,7 @@ package IkiWiki::Plugin::darcs; use warnings; use strict; +use URI::Escape q{uri_escape_utf8}; use IkiWiki; sub import { @@ -336,7 +337,8 @@ sub rcs_recentchanges ($) { foreach my $f (@files) { my $d = defined $config{'diffurl'} ? $config{'diffurl'} : ""; - $d =~ s/\[\[file\]\]/$f/go; + my $ef = uri_escape_utf8($f); + $d =~ s/\[\[file\]\]/$ef/go; $d =~ s/\[\[hash\]\]/$hash/go; push @pg, { @@ -377,7 +379,8 @@ sub rcs_diff ($;$) { my $rev=shift; my $maxlines=shift; my @lines; - foreach my $line (silentsystem("darcs", "diff", "--match", "hash ".$rev)) { + my $repodir=$config{srcdir}; + foreach my $line (`darcs diff --repodir $repodir --match 'hash $rev'`) { if (@lines || $line=~/^diff/) { last if defined $maxlines && @lines == $maxlines; push @lines, $line."\n";