X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/33f60260b233d0310ce6dd4304304a516595b906..51b4083c2286946973b066923d3af6e289f771ab:/IkiWiki/CGI.pm diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm index 0224c2aac..a6c0c2712 100644 --- a/IkiWiki/CGI.pm +++ b/IkiWiki/CGI.pm @@ -122,7 +122,8 @@ 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)}); } } } @@ -490,6 +491,9 @@ sub cgi (;$$) { sub cgierror ($) { my $message=shift; + eval q{use HTML::Entities}; + $message = encode_entities($message); + print "Content-type: text/html\n\n"; print cgitemplate(undef, gettext("Error"), "

".gettext("Error").": $message

");