diff --git a/htdocs/lib/functions.lib.php b/htdocs/lib/functions.lib.php index 76deaccd75e..dc6d61a208e 100644 --- a/htdocs/lib/functions.lib.php +++ b/htdocs/lib/functions.lib.php @@ -3445,9 +3445,6 @@ function dol_htmlentitiesbr($stringtoencode,$nl2brmode=0,$pagecodefrom='UTF-8') if (dol_textishtml($stringtoencode)) { $newstring=$stringtoencode; - //$newstring=preg_replace('/([^]+)(\r\n|\r|\n)+/i',($forxml?'$1
':'$1
'),$stringtoencode); // Don't replace if in list - //$newstring=preg_replace('/(\r\n|\r|\n)+/','__li__',$newstring); // Don't replace if \n is just after a li - //$newstring=preg_replace('/(\r\n|\r|\n)+/i',($forxml?'
':'
'),$newstring); // If already HTML, CR should be
so we don't change \n $newstring=preg_replace('//i','
',$newstring); // Replace "
" by "
". It's same and avoid pb with FPDF. $newstring=preg_replace('/
$/i','',$newstring); // Remove last
$newstring=strtr($newstring,array('&'=>'__and__','<'=>'__lt__','>'=>'__gt__','"'=>'__dquot__'));