From e555233dc12c1a206ae41754df78f2086cbba110 Mon Sep 17 00:00:00 2001 From: Kjeld Borch Egevang Date: Sat, 9 Sep 2017 11:29:30 +0200 Subject: [PATCH] Remove processing by htmlentities() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When translated texts contain international characters they are unintentionally changed by htmlentities(). You can see the problem at the admin/index.php page (language set to French): Les paramètres dans le menu Configuration -> Société/Organisation sont requis car les données définies sont utilisées dans l'affichage Dolibarr et pour personnaliser le comportement par défaut du logiciel (pour les fonctionnalités liées à un pays par exemple). --- htdocs/core/class/translate.class.php | 9 --------- 1 file changed, 9 deletions(-) diff --git a/htdocs/core/class/translate.class.php b/htdocs/core/class/translate.class.php index 169aec16307..180b4db0ba6 100644 --- a/htdocs/core/class/translate.class.php +++ b/htdocs/core/class/translate.class.php @@ -620,15 +620,6 @@ class Translate if ($maxsize) $str=dol_trunc($str,$maxsize); - // We replace some HTML tags by __xx__ to avoid having them encoded by htmlentities - $str=str_replace(array('<','>','"',),array('__lt__','__gt__','__quot__'),$str); - - // Crypt string into HTML - $str=htmlentities($str,ENT_QUOTES,$this->charset_output); - - // Restore HTML tags - $str=str_replace(array('__lt__','__gt__','__quot__'),array('<','>','"',),$str); - return $str; } else // Translation is not available