diff options
author | Joey Hess <joey@kitenet.net> | 2012-03-13 11:49:29 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-03-13 11:50:39 -0400 |
commit | f0733e6b9650e518edbc635b7fdb22b44155732d (patch) | |
tree | 89fad2ea5357c93f166aab079cc80a215b21df11 /IkiWiki/Plugin/mercurial.pm | |
parent | d903f2c2fa337c28ef1369caa606dd012100ad4e (diff) | |
download | ikiwiki-f0733e6b9650e518edbc635b7fdb22b44155732d.tar ikiwiki-f0733e6b9650e518edbc635b7fdb22b44155732d.tar.gz |
URI escape filename when generating the diffurl.
ikiwiki source files can contain at least one character that
needs to be escaped in an url: +
Diffstat (limited to 'IkiWiki/Plugin/mercurial.pm')
-rw-r--r-- | IkiWiki/Plugin/mercurial.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/IkiWiki/Plugin/mercurial.pm b/IkiWiki/Plugin/mercurial.pm index b7fe01485..8da4ceb07 100644 --- a/IkiWiki/Plugin/mercurial.pm +++ b/IkiWiki/Plugin/mercurial.pm @@ -5,6 +5,7 @@ use warnings; use strict; use IkiWiki; use Encode; +use URI::Escape q{uri_escape_utf8}; use open qw{:utf8 :std}; sub import { @@ -265,7 +266,8 @@ sub rcs_recentchanges ($) { foreach my $file (split / /,$info->{files}) { my $diffurl = defined $config{diffurl} ? $config{'diffurl'} : ""; - $diffurl =~ s/\[\[file\]\]/$file/go; + my $efile = uri_escape_utf8($file); + $diffurl =~ s/\[\[file\]\]/$efile/go; $diffurl =~ s/\[\[r2\]\]/$info->{changeset}/go; push @pages, { |