From cedf2c0af568d801fe2cf1917ac0202ce64f838b Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 16 Nov 2010 15:12:52 -0400 Subject: [PATCH] Fix escaping of filenames in historyurl. (Thanks, aj) --- IkiWiki/Render.pm | 4 ++-- debian/changelog | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index 7ea919abc..8e8336b99 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -5,7 +5,6 @@ package IkiWiki; use warnings; use strict; use IkiWiki; -use Encode; my (%backlinks, %rendered); our %brokenlinks; @@ -94,7 +93,8 @@ sub genpage ($$) { } if (defined $config{historyurl} && length $config{historyurl}) { my $u=$config{historyurl}; - $u=~s/\[\[file\]\]/$pagesources{$page}/g; + my $p=uri_escape_utf8($pagesources{$page}); + $u=~s/\[\[file\]\]/$p/g; $template->param(historyurl => $u); $actions++; } diff --git a/debian/changelog b/debian/changelog index faabf1993..00c32e95d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,7 @@ ikiwiki (3.20101113) UNRELEASED; urgency=low * websetup: Fix encoding problem when restoring old setup file. * more: Add pages parameter to limit where the more is displayed. (thanks, dark) + * Fix escaping of filenames in historyurl. (Thanks, aj) -- Joey Hess Tue, 16 Nov 2010 14:23:47 -0400 -- 2.11.4.GIT