Revert "Remove processing by htmlentities()"

This reverts commit e555233dc1.
This commit is contained in:
Gitdyr 2017-09-10 07:24:38 +02:00
parent 68a8ef6e2d
commit 7f8d791d39

View File

@ -620,6 +620,15 @@ 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