aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2010-01-09 16:20:09 -0500
committerJoey Hess <joey@gnu.kitenet.net>2010-01-09 16:20:09 -0500
commit59d929d6b1271c84c6d17ffbff65b57bf67d49e6 (patch)
tree29c3a94c54cd2978273a499633c9eac05b5b11e2 /IkiWiki/Plugin
parent6a0af02d3f30103196b9452077b5a68177c9fde4 (diff)
downloadikiwiki-59d929d6b1271c84c6d17ffbff65b57bf67d49e6.tar
ikiwiki-59d929d6b1271c84c6d17ffbff65b57bf67d49e6.tar.gz
websetup: Fix utf-8 problems.
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});