From d570d2a3e7158206c0cb65731d25718f20b457d0 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Tue, 7 Jul 2009 13:57:42 -0600 Subject: [PATCH] Correctly identify charset of HTML data --- framework/Mime/lib/Horde/Mime/Viewer/Html.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/framework/Mime/lib/Horde/Mime/Viewer/Html.php b/framework/Mime/lib/Horde/Mime/Viewer/Html.php index a2b66dc96..1da54afac 100644 --- a/framework/Mime/lib/Horde/Mime/Viewer/Html.php +++ b/framework/Mime/lib/Horde/Mime/Viewer/Html.php @@ -73,10 +73,12 @@ class Horde_Mime_Viewer_html extends Horde_Mime_Viewer_Driver * * @param string $data The HTML data. * @param boolean $inline Are we viewing inline? + * @param string $charset The charset of $data (if different than the + * base part charset). * * @return array Two elements: 'html' and 'status'. */ - protected function _cleanHTML($data, $inline) + protected function _cleanHTML($data, $inline, $charset = null) { global $browser; @@ -115,7 +117,7 @@ class Horde_Mime_Viewer_html extends Horde_Mime_Viewer_Driver $data = Horde_Text_Filter::filter($data, array('cleanhtml', 'xss'), array( array( - 'charset' => $this->_mimepart->getCharset() + 'charset' => is_null($charset) ? $this->_mimepart->getCharset() : $charset ), array( 'body_only' => $inline, -- 2.11.0