From eda92ed4c0d2735144df8fa2136584de69634bdb Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Sun, 11 May 2014 11:03:45 +0200 Subject: Improved display of plain text messages and text to HTML conversion (#1488937) Now instead of
 we use 
styled with monospace font. We replace whitespace characters with non-breaking spaces where needed. I.e. plain text is always unwrappable, until it uses format=flowed, in such a case only flowed paragraphs are wrappable. Also conversion of text to HTML in compose editor was modified in the same way. --- program/steps/mail/compose.inc | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'program/steps/mail/compose.inc') diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc index 2b717d673..0ceb85db2 100644 --- a/program/steps/mail/compose.inc +++ b/program/steps/mail/compose.inc @@ -624,7 +624,8 @@ function rcmail_compose_header_from($attrib) } if (!$sql_arr['html_signature']) { - $html = "
" . $html . "
"; + $t2h = new rcube_text2html($sql_arr['signature'], false); + $html = $t2h->get_html(); } $a_signatures[$identity_id]['text'] = $text; @@ -826,15 +827,8 @@ function rcmail_compose_part_body($part, $isHtml = false) } } - if ($part->ctype_parameters['format'] == 'flowed') { - $body = rcube_mime::unfold_flowed($body); - } - // add HTML formatting - $body = rcmail_plain_body($body); - if ($body) { - $body = '
' . $body . '
'; - } + $body = rcmail_plain_body($body, $part->ctype_parameters['format'] == 'flowed'); } } else { -- cgit v1.2.3