From c7adfe60cc13888ffaf948a03ece8c306d34eb40 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 18 Dec 2010 03:36:35 +0000 Subject: [PATCH] Fix: Donation receipt was not correctly encoded --- htdocs/document.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/document.php b/htdocs/document.php index 40fb6045391..44f5776bd71 100644 --- a/htdocs/document.php +++ b/htdocs/document.php @@ -33,7 +33,7 @@ define('NOTOKENRENEWAL',1); // Disables token renewal // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP). -$encoding = 'UTF-8'; +$encoding = ''; $action = isset($_GET["action"])?$_GET["action"]:''; $original_file = isset($_GET["file"])?$_GET["file"]:''; $modulepart = isset($_GET["modulepart"])?$_GET["modulepart"]:''; @@ -525,7 +525,7 @@ else // Open and return file // Les drois sont ok et fichier trouve, on l'envoie if ($encoding) header('Content-Encoding: '.$encoding); - if ($type) header('Content-Type: '.$type); + if ($type) header('Content-Type: '.$type.(preg_match('/text/',$type)?'; charset="'.$conf->file->character_set_client:'')); if ($attachment) header('Content-Disposition: attachment; filename="'.$filename.'"'); else header('Content-Disposition: inline; filename="'.$filename.'"');