X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/a05277128732beb351aa696c49d337086414ffb6..9485bd1e5d76432139e4ef691e8d61cdfe41d03b:/IkiWiki/CGI.pm diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm index 8fdde1a2e..d801c72a0 100644 --- a/IkiWiki/CGI.pm +++ b/IkiWiki/CGI.pm @@ -116,16 +116,15 @@ sub decode_cgi_utf8 ($) { if ($] < 5.01) { my $cgi = shift; foreach my $f ($cgi->param) { - $cgi->param($f, map { decode_utf8 $_ } $cgi->param($f)); + $cgi->param($f, map { decode_utf8 $_ } + @{$cgi->param_fetch($f)}); } } } sub safe_decode_utf8 ($) { my $octets = shift; - # call decode_utf8 on >= 5.20 only if it's not already decoded, - # otherwise it balks, on < 5.20, always call it - if ($] < 5.02 || !Encode::is_utf8($octets)) { + if (!Encode::is_utf8($octets)) { return decode_utf8($octets); } else {