forked from extern/egroupware
Fix replying to some mails with broken pre tags would cause infinite loop
This commit is contained in:
parent
8807c9242c
commit
cf2d626bca
@ -555,7 +555,9 @@ class Html
|
||||
$html2ret[] = substr($html,0,$pos);
|
||||
while ($pos!==false)
|
||||
{
|
||||
$endofpre = stripos($html,'</pre>',$pos);
|
||||
// avoid infinit loop in case the endof pre can't be found, just give the
|
||||
// end position to return the rest of content as return html
|
||||
$endofpre = (stripos($html,'</pre>',$pos) === false ? strlen($html) : stripos($html,'</pre>',$pos));
|
||||
$length = $endofpre-$pos+6;
|
||||
$html2ret[] = substr($html,$pos,$length);
|
||||
$searchFor = '<pre ';
|
||||
|
Loading…
Reference in New Issue
Block a user