From c630a825e8e09efb128b172d2623f461a60b69f6 Mon Sep 17 00:00:00 2001 From: Nicolas Vigier Date: Sun, 21 Jul 2013 09:56:14 +0000 Subject: Set ENCODING when creating templates --- lib/MGA/Advisories.pm | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib') diff --git a/lib/MGA/Advisories.pm b/lib/MGA/Advisories.pm index 97fc77c..61f2cef 100644 --- a/lib/MGA/Advisories.pm +++ b/lib/MGA/Advisories.pm @@ -205,6 +205,7 @@ sub process_template { sub output_pages { my ($advdb) = @_; my $template = Template->new( + ENCODING => 'utf8', INCLUDE_PATH => $config->{tmpl_dir}, OUTPUT_PATH => $config->{out_dir}, ); @@ -246,6 +247,7 @@ sub send_adv_mail { return unless $config->{send_adv_mail} eq 'yes'; return unless $config->{mode} eq 'site'; my $template = Template->new( + ENCODING => 'utf8', INCLUDE_PATH => $config->{tmpl_dir}, ); foreach my $adv (keys %{$advdb->{advisories}}) { @@ -283,6 +285,7 @@ sub send_report { my ($advdb) = @_; return unless @report_logs; my $template = Template->new( + ENCODING => 'utf8', INCLUDE_PATH => $config->{tmpl_dir}, ); my $reportcontent; @@ -322,6 +325,7 @@ sub newadv { my $template = Template->new( INCLUDE_PATH => $config->{tmpl_dir}, OUTPUT_PATH => $config->{advisories_dir}, + ENCODING => 'utf8', ); my $vars = { type => $type, @@ -353,6 +357,7 @@ sub showadv { return undef; } my $template = Template->new( + ENCODING => 'utf8', INCLUDE_PATH => $config->{tmpl_dir}, ); my $vars = { -- cgit v1.2.1