summaryrefslogtreecommitdiff
path: root/program/steps/mail/compose.inc
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2014-05-11 11:03:45 +0200
committerAleksander Machniak <alec@alec.pl>2014-05-11 11:03:45 +0200
commiteda92ed4c0d2735144df8fa2136584de69634bdb (patch)
treeab1f817904ed365e657380d784107ef4e14f18ce /program/steps/mail/compose.inc
parent638ebf69c4bdc3717d8ae535ec3b1f4b753f5856 (diff)
Improved display of plain text messages and text to HTML conversion (#1488937)
Now instead of <pre> we use <div class="pre"> 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.
Diffstat (limited to 'program/steps/mail/compose.inc')
-rw-r--r--program/steps/mail/compose.inc12
1 files changed, 3 insertions, 9 deletions
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 = "<pre>" . $html . "</pre>";
+ $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 = '<pre>' . $body . '</pre>';
- }
+ $body = rcmail_plain_body($body, $part->ctype_parameters['format'] == 'flowed');
}
}
else {