mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-10 19:41:26 +01:00
Fix: functions "ereg", "ereg_replace", "eregi", "eregi_replace" is deprecated since php 5.3.0
This commit is contained in:
@@ -2710,7 +2710,7 @@ function dol_htmlentitiesbr($stringtoencode,$nl2brmode=0,$pagecodefrom='UTF-8')
|
|||||||
if (dol_textishtml($stringtoencode))
|
if (dol_textishtml($stringtoencode))
|
||||||
{
|
{
|
||||||
//$trans = get_html_translation_table(HTML_ENTITIES, ENT_COMPAT); var_dump($trans);
|
//$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=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=strtr($newstring,array('&'=>'__and__','<'=>'__lt__','>'=>'__gt__','"'=>'__dquot__'));
|
||||||
$newstring=@htmlentities($newstring,ENT_COMPAT,$pagecodefrom); // Make entity encoding
|
$newstring=@htmlentities($newstring,ENT_COMPAT,$pagecodefrom); // Make entity encoding
|
||||||
|
|||||||
Reference in New Issue
Block a user