From b9ee965a3a74df4427d0e43450920484ea7c849d Mon Sep 17 00:00:00 2001 From: Regis Houssin <regis@dolibarr.fr> Date: Wed, 21 Oct 2009 19:09:48 +0000 Subject: [PATCH] Fix: functions "ereg", "ereg_replace", "eregi", "eregi_replace" is deprecated since php 5.3.0 --- htdocs/lib/functions.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/lib/functions.lib.php b/htdocs/lib/functions.lib.php index 4221553c48d..f4076c7c327 100644 --- a/htdocs/lib/functions.lib.php +++ b/htdocs/lib/functions.lib.php @@ -2710,7 +2710,7 @@ function dol_htmlentitiesbr($stringtoencode,$nl2brmode=0,$pagecodefrom='UTF-8') if (dol_textishtml($stringtoencode)) { //$trans = get_html_translation_table(HTML_ENTITIES, ENT_COMPAT); var_dump($trans); - $newstring=preg_replace('/<br(\s[\sa-zA-Z_="]*)?\/?/i>','<br>',$stringtoencode); // Replace "<br type="_moz" />" by "<br>". It's same and avoid pb with FPDF. + $newstring=preg_replace('/<br(\s[\sa-zA-Z_="]*)?\/?>/i','<br>',$stringtoencode); // Replace "<br type="_moz" />" by "<br>". It's same and avoid pb with FPDF. $newstring=preg_replace('/<br>$/i','',$newstring); // Replace "<br type="_moz" />" by "<br>". It's same and avoid pb with FPDF. $newstring=strtr($newstring,array('&'=>'__and__','<'=>'__lt__','>'=>'__gt__','"'=>'__dquot__')); $newstring=@htmlentities($newstring,ENT_COMPAT,$pagecodefrom); // Make entity encoding -- GitLab