From: Michael M Slusarz Date: Tue, 7 Jul 2009 19:57:42 +0000 (-0600) Subject: Correctly identify charset of HTML data X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=d570d2a3e7158206c0cb65731d25718f20b457d0;p=horde.git Correctly identify charset of HTML data --- 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,