I'm still able to reproduce the issue with roundcube's svn-trunk and php-trunk with that message, it only loads partway. The problem is libxml has a self-imposed limit on how many blocks deep it handles. I can reproduce this with the following php code:
<? $size = 256; $html = '<html><body>'; for($i=0;$i<$size;$i++) { $html .= '<span>'; } $html .= 'test'; for($i=0;$i<$size;$i++) { $html .= '</span>'; } $html .= '</body></html>'; $node = new DOMDocument('1.0', "UTF-8"); $node->loadHTML($html); print $node->saveHTML(); ?>
I get the warning DOMDocument::loadHTML(): Excessive depth in document: 256 use XML_PARSE_HUGE option in Entity
PHP doesn't currently have a way of passing this option to loadHTML so I submitted a patch to pass options through to libxml and with this patch and the LIBXML_PARSEHUGE option passed to loadHTML in roundcube the message appears to load correctly, at least in firefox and chrome, IE has a separate issue I have to investigate.
On Fri, Feb 18, 2011 at 1:29 AM, A.L.E.C alec@alec.pl wrote:
On 17.02.2011 19:12, James Devine wrote:
The attached message is an example of a message which causes issue. I've patched php to allow passing the LIBXML_PARSEHUGE option to $node->loadHTML() which seems to solve the issue, IE has a separate issue with this message though. When the message is selected in IE, roundcube sits at loading until it times out. Firefox and Chrome seem to handle it fine though.
The message works for me with Roundcube's svn-trunk version and PHP 5.3.5-pl0-gentoo (built: Jan 11 2011 11:11:00) PHP 5.3.3-1ubuntu9.3 with Suhosin-Patch (built: Jan 12 2011 16:08:14)
-- Aleksander 'A.L.E.C' Machniak LAN Management System Developer [http://lms.org.pl] Roundcube Webmail Developer [http://roundcube.net]
PGP: 19359DC1 @@ GG: 2275252 @@ WWW: http://alec.pl