X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/6a0af02d3f30103196b9452077b5a68177c9fde4..59d929d6b1271c84c6d17ffbff65b57bf67d49e6:/IkiWiki/Plugin/websetup.pm diff --git a/IkiWiki/Plugin/websetup.pm b/IkiWiki/Plugin/websetup.pm index 9edd22d26..75aa3681c 100644 --- a/IkiWiki/Plugin/websetup.pm +++ b/IkiWiki/Plugin/websetup.pm @@ -139,7 +139,11 @@ sub showfields ($$$@) { my $value=$config{$key}; if ($info{safe} && (ref $value eq 'ARRAY' || ref $info{example} eq 'ARRAY')) { - $value=[(ref $value eq 'ARRAY' ? @{$value} : ""), "", ""]; # blank items for expansion + $value=[(ref $value eq 'ARRAY' ? map { Encode::encode_utf8($_) } @{$value} : ""), + "", ""]; # blank items for expansion + } + else { + $value=Encode::encode_utf8($value); } if ($info{type} eq "string") { @@ -290,7 +294,6 @@ sub showform ($$) { shift->(form => $form, cgi => $cgi, session => $session, buttons => $buttons); }); - IkiWiki::decode_form_utf8($form); my %fields=showfields($form, undef, undef, IkiWiki::getsetup()); @@ -308,6 +311,8 @@ sub showform ($$) { $fields{$_}=$shown{$_} foreach keys %shown; } } + + IkiWiki::decode_form_utf8($form); if ($form->submitted eq "Cancel") { IkiWiki::redirect($cgi, $config{url});