From 0773d1ad3aafb81d6cde9e91579a4ebfbf822b51 Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Fri, 7 Mar 2014 14:54:44 +0000 Subject: [PATCH] handle access space in front for switch from plain text to html too --- mail/inc/class.mail_compose.inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mail/inc/class.mail_compose.inc.php b/mail/inc/class.mail_compose.inc.php index c0a852336c..58297d1bde 100644 --- a/mail/inc/class.mail_compose.inc.php +++ b/mail/inc/class.mail_compose.inc.php @@ -525,7 +525,7 @@ class mail_compose if ($content['is_plain'] && $content['mimeType']=='html') { // the possible font span should only be applied on first load or on switch plain->html - $isFirstLoad = true; + $isFirstLoad = "switchedplaintohtml"; //error_log(__METHOD__.__LINE__.$content['mail_plaintext']); $suppressSigOnTop = true; $content['mail_plaintext'] = str_replace(array("\r\n","\n","\r"),array("
","
","
"),$content['mail_plaintext']); @@ -1106,7 +1106,7 @@ class mail_compose { $disableRuler = true; } - $font_span =''; + $font_span = $font_part = ''; if($content['mimeType'] == 'html' /*&& trim($content['body'])==''*/) { // User preferences for style $font = $GLOBALS['egw_info']['user']['preferences']['common']['rte_font']; @@ -1160,7 +1160,7 @@ class mail_compose } else { - $content['body'] = ($font_span?$font_span:/*($content['mimeType'] == 'html'?' ':'')*/'').$content['body']; + $content['body'] = ($font_span?($isFirstLoad == "switchedplaintohtml"?$font_part:$font_span):/*($content['mimeType'] == 'html'?' ':'')*/'').$content['body'].($isFirstLoad == "switchedplaintohtml"?"":""); } //error_log(__METHOD__.__LINE__.$content['body']);