Fix: Si le message traduit contient des < ou >, il est mal affich.

This commit is contained in:
Laurent Destailleur 2005-01-24 19:34:17 +00:00
parent 2346158f1e
commit b5a4379dc7

View File

@ -115,6 +115,18 @@ class Translate {
function trans($str, $param1='', $param2='', $param3='') {
if ($this->tab_translate[$str]) {
// Si la traduction est disponible
if ($param1) {
$param1=ereg_replace("<","&lt;",$param1);
$param1=ereg_replace(">","&gt;",$param1);
}
if ($param2) {
$param2=ereg_replace("<","&lt;",$param2);
$param2=ereg_replace(">","&gt;",$param2);
}
if ($param3) {
$param3=ereg_replace("<","&lt;",$param3);
$param3=ereg_replace(">","&gt;",$param3);
}
return sprintf($this->tab_translate[$str],$param1,$param2,$param3);
}
return $str;