From 653e04ceccceda4d306c7c26054f3342fe464ff2 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Thu, 18 Apr 2013 15:07:40 -0300 Subject: [PATCH] Bug 10074 - Encoding problems in templates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug 6554 patched output_html_with_http_headers to encode utf8 data, and Templates.pm to expect utf8 data to be encoded. (At least) the staff login screen outputs directly to STDOUT (Auth.pm does, WHICH IS WRONG!) and wasn't fixed to do the encoding first. This patch makes it use output_html_with_http_headers and solves the problem. Regards To+ Sponsored-by: Universidad Nacional de Córdoba --- C4/Auth.pm | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index ca061b5..be5904a 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -19,12 +19,14 @@ package C4::Auth; use strict; use warnings; + use Digest::MD5 qw(md5_base64); use Storable qw(thaw freeze); use URI::Escape; use CGI::Session; require Exporter; +use C4::Output; use C4::Context; use C4::Templates; # to get the template use C4::Branch; # GetBranches @@ -1065,14 +1067,8 @@ sub checkauth { LibraryName => C4::Context->preference("LibraryName"), ); $template->param( %info ); -# $cookie = $query->cookie(CGISESSID => $session->id -# ); - print $query->header( - -type => 'text/html', - -charset => 'utf-8', - -cookie => $cookie - ), - $template->output; + + output_html_with_http_headers $query, $cookie, $template->output; safe_exit; } -- 1.8.1.2