From 136df3a6f3b8f66a4f37567ce38ae9b4f2668797 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Wed, 3 Feb 2010 14:47:36 -0700 Subject: [PATCH] Bug #8708: Silence HTML parsing errors; changelog --- imp/docs/CHANGES | 1 + imp/print.php | 2 ++ 2 files changed, 3 insertions(+) diff --git a/imp/docs/CHANGES b/imp/docs/CHANGES index 11cfb574e..99f97ee8b 100644 --- a/imp/docs/CHANGES +++ b/imp/docs/CHANGES @@ -2,6 +2,7 @@ v5.0-git -------- +[mms] Fix printing multipage HTML messages in Mozilla browsers (Bug #8708). [mms] Provide command line script to obtain IMAP caching statistics. [mms] Catch flag changes from other IMAP clients when refreshing if CONDSTORE is available on the IMAP server (DIMP). diff --git a/imp/print.php b/imp/print.php index b428de11a..9f780d0e2 100644 --- a/imp/print.php +++ b/imp/print.php @@ -107,6 +107,8 @@ case 'headers': $key = key($render); $browser->downloadHeaders($render[$key]['name'], $render[$key]['type'], true, strlen($render[$key]['data'])); if ($browser->isBrowser('mozilla')) { + /* Silence errors from parsing HTML. */ + libxml_use_internal_errors(true); $doc = DOMDocument::loadHTML($render[$key]['data']); $bodyelt = $doc->getElementsByTagName('body')->item(0); $bodyelt->insertBefore($doc->importNode($elt, true), $bodyelt->firstChild); -- 2.11.0