From: Joey Hess Date: Sat, 9 Jan 2010 21:07:01 +0000 (-0500) Subject: make decode_form_utf8 safe for arrays X-Git-Url: https://scripts.mit.edu/gitweb/www/ikiwiki.git/commitdiff_plain/6a0af02d3f30103196b9452077b5a68177c9fde4 make decode_form_utf8 safe for arrays --- 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, ); }