Clean last br for wysiwyg
This commit is contained in:
parent
12d211815b
commit
421b692942
@ -6638,7 +6638,8 @@ function dol_htmlentitiesbr_decode($stringtodecode, $pagecodeto = 'UTF-8')
|
|||||||
*/
|
*/
|
||||||
function dol_htmlcleanlastbr($stringtodecode)
|
function dol_htmlcleanlastbr($stringtodecode)
|
||||||
{
|
{
|
||||||
$ret = preg_replace('/(<br>|<br(\s[\sa-zA-Z_="]*)?\/?>|'."\n".'|'."\r".')+$/i', "", $stringtodecode);
|
$ret = preg_replace('/ $/i', "", $stringtodecode); // Because wysiwyg editor may add a at end of last line
|
||||||
|
$ret = preg_replace('/(<br>|<br(\s[\sa-zA-Z_="]*)?\/?>|'."\n".'|'."\r".')+$/i', "", $ret);
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user