From 65cc1c196f0aff83a6c9db7b6e3a36630b66392d Mon Sep 17 00:00:00 2001 From: thomascube <thomas@roundcube.net> Date: Wed, 04 Jun 2008 05:13:06 -0400 Subject: [PATCH] Chech for mb_convert_encoding first because mbstring is optional for RoundCube + add some phpdoc --- program/lib/washtml.php | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/program/lib/washtml.php b/program/lib/washtml.php index f45fd45..ad5f930 100644 --- a/program/lib/washtml.php +++ b/program/lib/washtml.php @@ -187,7 +187,8 @@ //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); } -- Gitblit v1.9.1