aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--IkiWiki/Plugin/rename.pm9
-rw-r--r--debian/changelog1
2 files changed, 6 insertions, 4 deletions
diff --git a/IkiWiki/Plugin/rename.pm b/IkiWiki/Plugin/rename.pm
index c3e03496f..8213d21f6 100644
--- a/IkiWiki/Plugin/rename.pm
+++ b/IkiWiki/Plugin/rename.pm
@@ -235,6 +235,7 @@ sub formbuilder (@) {
if (defined $form->field("do") && ($form->field("do") eq "edit" ||
$form->field("do") eq "create")) {
+ IkiWiki::decode_form_utf8($form);
my $q=$params{cgi};
my $session=$params{session};
@@ -242,7 +243,7 @@ sub formbuilder (@) {
rename_start($q, $session, 0, $form->field("page"));
}
elsif ($form->submitted eq "Rename Attachment") {
- my @selected=$q->param("attachment_select");
+ my @selected=map { Encode::decode_utf8($_) } $q->param("attachment_select");
if (@selected > 1) {
error(gettext("Only one attachment can be renamed at a time."));
}
@@ -278,7 +279,7 @@ sub sessioncgi ($$) {
if ($q->param("do") eq 'rename') {
my $session=shift;
- my ($form, $buttons)=rename_form($q, $session, $q->param("page"));
+ my ($form, $buttons)=rename_form($q, $session, Encode::decode_utf8($q->param("page")));
IkiWiki::decode_form_utf8($form);
if ($form->submitted eq 'Cancel') {
@@ -290,9 +291,9 @@ sub sessioncgi ($$) {
# These untaints are safe because of the checks
# performed in check_canrename later.
- my $src=$q->param("page");
+ my $src=$form->field("page");
my $srcfile=IkiWiki::possibly_foolish_untaint($pagesources{$src});
- my $dest=IkiWiki::possibly_foolish_untaint(titlepage($q->param("new_name")));
+ my $dest=IkiWiki::possibly_foolish_untaint(titlepage($form->field("new_name")));
my $destfile=$dest;
if (! $q->param("attachment")) {
my $type=$q->param('type');
diff --git a/debian/changelog b/debian/changelog
index 491e07a4a..41f4ec870 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,7 @@ ikiwiki (3.20091203) UNRELEASED; urgency=low
* Improve javascript onload handling.
* monotone: Deal with format change in version 0.45.
(Thanks, Richard Levitte)
+ * rename: Fix some utf-8 problems.
-- Joey Hess <joeyh@debian.org> Wed, 02 Dec 2009 17:22:21 -0500