summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2010-01-09 16:07:01 -0500
committerJoey Hess <joey@gnu.kitenet.net>2010-01-09 16:07:01 -0500
commit6a0af02d3f30103196b9452077b5a68177c9fde4 (patch)
tree27e15e7ca3982ed6da448f4135672e8da67e9924
parent9d673e31e755a0e1595d3472de12937517d3a24a (diff)
make decode_form_utf8 safe for arrays
-rw-r--r--IkiWiki/CGI.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm
index 866711a71..cd4a5574c 100644
--- a/IkiWiki/CGI.pm
+++ b/IkiWiki/CGI.pm
@@ -65,8 +65,9 @@ sub decode_form_utf8 ($) {
if ($] >= 5.01) {
my $form = shift;
foreach my $f ($form->field) {
+ my @value=map { decode_utf8($_) } $form->field($f);
$form->field(name => $f,
- value => decode_utf8($form->field($f)),
+ value => \@value,
force => 1,
);
}