This commit is contained in:
Laurent Destailleur
2010-04-07 19:19:56 +00:00
parent d3aa15827a
commit 3aa18cfaa9

View File

@@ -194,7 +194,9 @@ function dol_escape_js($stringtoescape)
function dol_escape_htmltag($stringtoescape)
{
// escape quotes and backslashes, newlines, etc.
return strtr($stringtoescape, array('"'=>'',"\r"=>'\\r',"\n"=>'\\n',"<b>"=>'','</b>'=>''));
$tmp=@html_entity_decode($stringtoescape,ENT_COMPAT,'UTF-8');
$tmp=strtr($tmp, array('"'=>'',"\r"=>'\\r',"\n"=>'\\n',"<b>"=>'','</b>'=>''));
return @htmlentities($tmp,ENT_COMPAT,'UTF-8');
}