summaryrefslogtreecommitdiff
path: root/roundcubemail/program/lib
diff options
context:
space:
mode:
authorthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-06-04 09:13:06 +0000
committerthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-06-04 09:13:06 +0000
commit8585914c72a508746068c9d962a09ae6cf29615f (patch)
tree038a960ff0d702d72bd59dc4f65920c11f64669c /roundcubemail/program/lib
parentcae3ecab64d029e306c0505e00f01752ea6595e1 (diff)
Chech for mb_convert_encoding first because mbstring is optional for RoundCube + add some phpdoc
git-svn-id: https://svn.roundcube.net/trunk@1469 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/lib')
-rw-r--r--roundcubemail/program/lib/washtml.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/roundcubemail/program/lib/washtml.php b/roundcubemail/program/lib/washtml.php
index f45fd458a..ad5f930dc 100644
--- a/roundcubemail/program/lib/washtml.php
+++ b/roundcubemail/program/lib/washtml.php
@@ -187,7 +187,8 @@ class washtml
//Charset seems to be ignored (probably if defined in the HTML document)
$node = new DOMDocument('1.0', $config['charset']);
$full = true;
- $html = mb_convert_encoding($html, 'HTML-ENTITIES', 'UTF-8');
+ if (function_exists('mb_convert_encoding'))
+ $html = mb_convert_encoding($html, 'HTML-ENTITIES', $config['charset']);
@$node->loadHTML($html);
return self::dumpHtml($node, $config, $full);
}