mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-26 01:43:47 +01:00
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);
|
$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