mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 09:38:23 +01:00
Try to fix a lot of regression. Add also more phpunit test to avoid them in future.
This commit is contained in:
@@ -3064,10 +3064,7 @@ function dol_nl2br($stringtoencode,$nl2brmode=0,$forxml=false)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$ret=str_replace("\r","",$stringtoencode);
|
$ret=preg_replace('/(\r\n|\r|\n)/i',($forxml?'<br />':'<br>'),$stringtoencode);
|
||||||
$ret=str_replace("\n",($forxml?'<br />':'<br>'),$ret);
|
|
||||||
//$ret=preg_replace('/(<br>|<br\s*\/>|<br\/>)\s*(\r\n|\r|\n)+/i',($forxml?'<br />':'<br>'),$stringtoencode);
|
|
||||||
//$ret=preg_replace('/([^<li\s*>]+)(\r\n|\r|\n)+/i',($forxml?'$1<br />':'$1<br>'),$ret);
|
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user