diff options
| author | estadtherr <estadtherr@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2007-06-08 23:47:57 +0000 |
|---|---|---|
| committer | estadtherr <estadtherr@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2007-06-08 23:47:57 +0000 |
| commit | 91e0ca37e8d61b9055e950f82527896e75e713eb (patch) | |
| tree | 91d89726348a5c71e7532822a09d5490f1868e84 /roundcubemail/bin/html2text.php | |
| parent | df0fb2f0df335eb176f33c53b372a364a504e540 (diff) | |
fixed html2text in editor
git-svn-id: https://svn.roundcube.net/trunk@611 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/bin/html2text.php')
| -rw-r--r-- | roundcubemail/bin/html2text.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/roundcubemail/bin/html2text.php b/roundcubemail/bin/html2text.php index e0e2679f7..7f74ac622 100644 --- a/roundcubemail/bin/html2text.php +++ b/roundcubemail/bin/html2text.php @@ -8,9 +8,14 @@ $converter = new html2text($htmlText); header('Content-Type: text/plain; charset=UTF-8'); $plaintext = $converter->get_text(); -if (function_exists('html_entity_decode')) +$phpver = explode('.', phpversion()); +$vernum = $phpver[0] . $phpver[1] . $phpver[2]; + +# html_entity_decode doesn't handle UTF character sets in PHP 4.x + +if (($vernum >= 500) && function_exists('html_entity_decode')) print html_entity_decode($plaintext, ENT_COMPAT, 'UTF-8'); else print $plaintext; -?>
\ No newline at end of file +?> |
