I have a number of people complaining about messages not displaying correctly in roundcube, I can pull up the messages in squirrelmail and they will display correctly but in roundcube they only partially display, any idea how I might fix this?
Thanks, James Devine
If I take all out except the text/html part of the multipart message and throw it in a web directory I am able to view it fine with a browser
On Wed, Feb 16, 2011 at 9:47 AM, James Devine fxmulder@gmail.com wrote:
I have a number of people complaining about messages not displaying correctly in roundcube, I can pull up the messages in squirrelmail and they will display correctly but in roundcube they only partially display, any idea how I might fix this?
Thanks, James Devine
The problem actually seems to stem from DOMDocument in php when washing, if I run the html through
$node = new DOMDocument('1.0', "UTF-8"); @$node->loadHTML($html); print $node->saveHTML();
then it displays the same way
On Wed, Feb 16, 2011 at 10:27 AM, James Devine fxmulder@gmail.com wrote:
If I take all out except the text/html part of the multipart message and throw it in a web directory I am able to view it fine with a browser
On Wed, Feb 16, 2011 at 9:47 AM, James Devine fxmulder@gmail.com wrote:
I have a number of people complaining about messages not displaying correctly in roundcube, I can pull up the messages in squirrelmail and they will display correctly but in roundcube they only partially display, any idea how I might fix this?
Thanks, James Devine
It would appear that DOMDocument has a limit of 256 blocks deep and the emails have automatically generated html content that goes deeper than that
On Wed, Feb 16, 2011 at 11:07 AM, James Devine fxmulder@gmail.com wrote:
The problem actually seems to stem from DOMDocument in php when washing, if I run the html through
$node = new DOMDocument('1.0', "UTF-8"); @$node->loadHTML($html); print $node->saveHTML();
then it displays the same way
On Wed, Feb 16, 2011 at 10:27 AM, James Devine fxmulder@gmail.com wrote:
If I take all out except the text/html part of the multipart message and throw it in a web directory I am able to view it fine with a browser
On Wed, Feb 16, 2011 at 9:47 AM, James Devine fxmulder@gmail.com wrote:
I have a number of people complaining about messages not displaying correctly in roundcube, I can pull up the messages in squirrelmail and they will display correctly but in roundcube they only partially display, any idea how I might fix this?
Thanks, James Devine
Can you expand on this, James? I have had a couple of reported instances that sound as if the may be the same issue. Do any workarounds come to mind?
Arne Berglund System Administrator, Internet Services Lane Education Service District Eugene, OR ____________
On Wed, 16 Feb 2011 14:08:56 -0700, James Devine fxmulder@gmail.com wrote:
It would appear that DOMDocument has a limit of 256 blocks deep and the emails have automatically generated html content that goes deeper than that
On Wed, Feb 16, 2011 at 11:07 AM, James Devine fxmulder@gmail.com wrote:
The problem actually seems to stem from DOMDocument in php when washing, if I run the html through
$node = new DOMDocument('1.0', "UTF-8"); @$node->loadHTML($html); print $node->saveHTML();
then it displays the same way
On Wed, Feb 16, 2011 at 10:27 AM, James Devine fxmulder@gmail.com wrote:
If I take all out except the text/html part of the multipart message and throw it in a web directory I am able to view it fine with a browser
On Wed, Feb 16, 2011 at 9:47 AM, James Devine fxmulder@gmail.com wrote:
I have a number of people complaining about messages not displaying correctly in roundcube, I can pull up the messages in squirrelmail and they will display correctly but in roundcube they only partially display, any idea how I might fix this?
Thanks, James Devine
On 16.02.2011 22:08, James Devine wrote:
It would appear that DOMDocument has a limit of 256 blocks deep and the emails have automatically generated html content that goes deeper than that
Could you provide an original html content for testing?
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.
On Thu, Feb 17, 2011 at 12:15 AM, A.L.E.C alec@alec.pl wrote:
On 16.02.2011 22:08, James Devine wrote:
It would appear that DOMDocument has a limit of 256 blocks deep and the emails have automatically generated html content that goes deeper than that
Could you provide an original html content for testing?
-- 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
List info: http://lists.roundcube.net/users/ BT/041e0616
--- 8< --- detachments --- 8< --- The following attachments have been detached and are available for viewing. http://detached.gigo.com/rc/x0/HAD38XhY/message.txt Only click these links if you trust the sender, as well as this message. --- 8< --- detachments --- 8< ---
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)
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