From 7723d9ee81c79c8f3f9ec35f7d6f45b768aa7286 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 31 Aug 2011 15:41:07 +0000 Subject: [PATCH] Fix: W3C --- htdocs/lib/functions.lib.php | 3 --- 1 file changed, 3 deletions(-) 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__'));