summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin
diff options
context:
space:
mode:
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r--IkiWiki/Plugin/websetup.pm9
1 files changed, 7 insertions, 2 deletions
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});