Fix: refocusing footer and free text

This commit is contained in:
Regis Houssin
2009-07-31 19:55:20 +00:00
parent d55e388fd3
commit decca70ff5
2 changed files with 7 additions and 7 deletions

View File

@@ -2641,7 +2641,7 @@ function dol_nboflines_bis($texte,$maxlinesize=0)
{
$repTable = array("\t" => " ", "\n" => "<br>", "\r" => " ", "\0" => " ", "\x0B" => " ");
$texte = strtr($texte, $repTable);
$pattern = '/(<[^>]+>)/Uu';
$pattern = '/(<[^>]+>)/';
$a = preg_split($pattern, $texte, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
$nblines = floor((count($a)+1)/2);
// count possible auto line breaks