diff options
author | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-07-02 02:18:31 +0000 |
---|---|---|
committer | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-07-02 02:18:31 +0000 |
commit | 0bb605baf8702d1a5d1ee16f52b07840d88616e7 (patch) | |
tree | 192707c5e7d90b68de123e6fe3e233fc8511aa0a /IkiWiki/CGI.pm | |
parent | 25b35c3c7403202aae19c4a328f6af4d2aae2e68 (diff) | |
download | ikiwiki-0bb605baf8702d1a5d1ee16f52b07840d88616e7.tar ikiwiki-0bb605baf8702d1a5d1ee16f52b07840d88616e7.tar.gz |
* Parse svn log as xml for improved utf8 and security. Note that this makes
ikiwiki depend on XML::Simple. Patch by Faidon Liambotis.
Diffstat (limited to 'IkiWiki/CGI.pm')
-rw-r--r-- | IkiWiki/CGI.pm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm index 30af53586..f589ca41d 100644 --- a/IkiWiki/CGI.pm +++ b/IkiWiki/CGI.pm @@ -33,6 +33,11 @@ sub cgi_recentchanges ($) { #{{{ unlockwiki(); + # Force reading the template as utf-8, necessary if + # rcs_recentchanges returns true utf-8 strings. + open(TMPL, "<:utf8", "$config{templatedir}/recentchanges.tmpl"); + my $template=HTML::Template->new(filehandle => *TMPL); + close(TMPL); my $template=HTML::Template->new( filename => "$config{templatedir}/recentchanges.tmpl" ); @@ -44,8 +49,7 @@ sub cgi_recentchanges ($) { #{{{ styleurl => styleurl(), baseurl => "$config{url}/", ); - require Encode; - print $q->header(-charset=>'utf-8'), Encode::decode_utf8($template->output); + print $q->header(-charset=>'utf-8'), $template->output; } #}}} sub cgi_signin ($$) { #{{{ |