aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2010-11-16 15:12:52 -0400
committerJoey Hess <joey@kitenet.net>2010-11-16 15:12:52 -0400
commitcedf2c0af568d801fe2cf1917ac0202ce64f838b (patch)
tree5e35649e5fbb161fc898fb85c95cf2613def5059
parentdaf89f59e61d9091fe27dd8738b40db5fa85a5e6 (diff)
downloadikiwiki-cedf2c0af568d801fe2cf1917ac0202ce64f838b.tar
ikiwiki-cedf2c0af568d801fe2cf1917ac0202ce64f838b.tar.gz
Fix escaping of filenames in historyurl. (Thanks, aj)
-rw-r--r--IkiWiki/Render.pm4
-rw-r--r--debian/changelog1
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 <joeyh@debian.org> Tue, 16 Nov 2010 14:23:47 -0400