diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-11-11 13:39:10 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-11-11 13:39:10 +0000 |
| commit | fad50d371066cc8a7c043198e7cb60e571c8bc9f (patch) | |
| tree | 83156eaf18b60af7aad9054e27485a7cb09d69a0 /roundcubemail | |
| parent | aa9f6593af1e7b095371584262d6374dcd6e6d9d (diff) | |
- Fix displaying of text/plain messages containing HTML entities
git-svn-id: https://svn.roundcube.net/trunk@4215 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail')
| -rw-r--r-- | roundcubemail/program/include/main.inc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/roundcubemail/program/include/main.inc b/roundcubemail/program/include/main.inc index 4bf721336..31c9a0805 100644 --- a/roundcubemail/program/include/main.inc +++ b/roundcubemail/program/include/main.inc @@ -556,10 +556,14 @@ function rep_specialchars_output($str, $enctype='', $mode='', $newlines=TRUE) } else if ($mode=='remove') $str = strip_tags($str); - + + $out = strtr($str, $encode_arr); + // avoid douple quotation of & - $out = preg_replace('/&([A-Za-z]{2,6}|#[0-9]{2,4});/', '&\\1;', strtr($str, $encode_arr)); - + // commented out, because this breaks displaying of text with entity strings + // in text messages. + //$out = preg_replace('/&([A-Za-z]{2,6}|#[0-9]{2,4});/', '&\\1;', $out); + return $newlines ? nl2br($out) : $out; } |
