From: Joey Hess Date: Fri, 12 Feb 2010 03:55:35 +0000 (-0500) Subject: fix websetup display of unsafe arrays in expert mode X-Git-Tag: 3.20100212~22 X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/commitdiff_plain/8fdc238c8c9bdfd196310c6261d9ad328a4d9fd2?ds=inline fix websetup display of unsafe arrays in expert mode --- diff --git a/IkiWiki/Plugin/websetup.pm b/IkiWiki/Plugin/websetup.pm index e477bcc20..76ca1c9e2 100644 --- a/IkiWiki/Plugin/websetup.pm +++ b/IkiWiki/Plugin/websetup.pm @@ -138,9 +138,9 @@ sub showfields ($$$@) { my $value=$config{$key}; - if ($info{safe} && (ref $value eq 'ARRAY' || ref $info{example} eq 'ARRAY')) { - $value=[(ref $value eq 'ARRAY' ? map { Encode::encode_utf8($_) } @{$value} : ""), - "", ""]; # blank items for expansion + if (ref $value eq 'ARRAY' || ref $info{example} eq 'ARRAY') { + $value=[(ref $value eq 'ARRAY' ? map { Encode::encode_utf8($_) } @{$value} : "")]; + push @$value, "", "" if $info{safe}; # blank items for expansion } else { $value=Encode::encode_utf8($value);