Chech for mb_convert_encoding first because mbstring is optional for RoundCube + add some phpdoc
| | |
| | | //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); |
| | | } |
| | |
| | | |
| | | |
| | | /** |
| | | * Convert the given message part to proper HTML |
| | | * which can be displayed the message view |
| | | * |
| | | * @param object rcube_message_part Message part |
| | | * @param bool True if external objects (ie. images ) are allowed |
| | | * @param bool True if part should be converted to plaintext |
| | | * @return string Formatted HTML string |
| | | */ |
| | | function rcmail_print_body($part, $safe=FALSE, $plain=FALSE) |
| | | function rcmail_print_body($part, $safe=false, $plain=false) |
| | | { |
| | | global $REMOTE_OBJECTS; |
| | | |