From 9a52fed3d5d3c398e1137fafc53ad7da5c6ae75f Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Wed, 2 Feb 2022 13:51:20 +0100 Subject: [PATCH] Do not add extra elements into mail content as formatter because tinyMCE takes care of default formatting via its own styling mechanism --- mail/inc/class.mail_compose.inc.php | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/mail/inc/class.mail_compose.inc.php b/mail/inc/class.mail_compose.inc.php index 47e8cf86f0..99f72a6d66 100644 --- a/mail/inc/class.mail_compose.inc.php +++ b/mail/inc/class.mail_compose.inc.php @@ -1153,17 +1153,7 @@ class mail_compose { $disableRuler = true; } - $font_span = $font_part = ''; - if($content['mimeType'] == 'html') { - // User preferences for style - $font = $GLOBALS['egw_info']['user']['preferences']['common']['rte_font']; - $font_size = Etemplate\Widget\HtmlArea::font_size_from_prefs(); - $font_part = ''; - $font_span = $font_part.'​'; - if (empty($font) && empty($font_size)) $font_span = ''; - } - // the font span should only be applied on first load or on switch plain->html and the absence of the font_part of the span - if (!$isFirstLoad && !empty($font_span) && stripos($content['body'],$font_part)===false) $font_span = ''; + //remove possible html header stuff if (stripos($content['body'],'')!==false) $content['body'] = str_ireplace(array('',''),array('',''),$content['body']); //error_log(__METHOD__.__LINE__.array2string($this->mailPreferences));