From 2cdc34f0d45bdb8f5f34e45f929d1adf328e5cb2 Mon Sep 17 00:00:00 2001 From: thomasb Date: Thu, 9 Nov 2006 19:06:37 +0000 Subject: Corrected template parsing and output encoding git-svn-id: https://svn.roundcube.net/trunk@364 208e9e7b-5314-0410-a742-e7e81cd9613c --- roundcubemail/program/include/main.inc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'roundcubemail/program/include/main.inc') diff --git a/roundcubemail/program/include/main.inc b/roundcubemail/program/include/main.inc index b2e83b767..676883305 100644 --- a/roundcubemail/program/include/main.inc +++ b/roundcubemail/program/include/main.inc @@ -958,8 +958,9 @@ 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-z]{2,5});/', '&\\1;', strtr($str, $encode_arr)); return $newlines ? nl2br($out) : $out; } -- cgit v1.2.3