forked from extern/egroupware
Fix replying to some mails with broken pre tags would cause infinite loop
This commit is contained in:
parent
c8cf25e57f
commit
e00267f6f5
@ -493,7 +493,9 @@ class Html
|
|||||||
$html2ret[] = substr($html,0,$pos);
|
$html2ret[] = substr($html,0,$pos);
|
||||||
while ($pos!==false)
|
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;
|
$length = $endofpre-$pos+6;
|
||||||
$html2ret[] = substr($html,$pos,$length);
|
$html2ret[] = substr($html,$pos,$length);
|
||||||
$searchFor = '<pre ';
|
$searchFor = '<pre ';
|
||||||
|
Loading…
Reference in New Issue
Block a user