From 9fbee84f8bbfab1e3e8cde1efb394c27a6cbdd5e Mon Sep 17 00:00:00 2001
From: Guillaume Rousse <guillaume.rousse@renater.fr>
Date: Thu, 22 Feb 2018 14:03:33 +0100
Subject: [PATCH] encodage explicite pour les templates

---
 lib/AccountManager/WebRequest.pm | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/AccountManager/WebRequest.pm b/lib/AccountManager/WebRequest.pm
index 7da9ed0..e2fa0b9 100644
--- a/lib/AccountManager/WebRequest.pm
+++ b/lib/AccountManager/WebRequest.pm
@@ -142,6 +142,7 @@ sub respond {
 
     ## Parse template
     my $tt2 = Template->new({
+        ENCODING => 'utf8',
         INCLUDE_PATH => $self->{configuration}->{_}->{templates_dir} . "/web/$lang"
     });
 
@@ -359,6 +360,7 @@ sub req_complete_challenge {
     };
 
     my $tt2 = Template->new({
+        ENCODING => 'utf8',
         INCLUDE_PATH => $self->{configuration}->{_}->{templates_dir}
     });
     my $template = 'mail/send_authentication_token.tt2.eml';
@@ -531,6 +533,7 @@ sub req_create_accounts {
     my $lang = HTTP::AcceptLanguage->new($ENV{HTTP_ACCEPT_LANGUAGE})->match(qw/en fr/) || 'en';
 
     my $tt2 = Template->new({
+        ENCODING => 'utf8',
         INCLUDE_PATH => $self->{configuration}->{_}->{templates_dir} . "/web/$lang"
     });
 
-- 
GitLab