summaryrefslogtreecommitdiff
path: root/roundcubemail/program/steps/mail/compose.inc
diff options
context:
space:
mode:
authorthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-05-20 21:28:30 +0000
committerthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-05-20 21:28:30 +0000
commit83b297e2b198bd9034fb82d942353be51d003dea (patch)
tree0217411e199512df81188a1a75d64f7b0a8fc96c /roundcubemail/program/steps/mail/compose.inc
parent36077f1171371c85657d646c7fc34485ff0a5ce0 (diff)
Display and send messages with format=flowed (#1484370), fixes word wrapping issues (#1486543)
git-svn-id: https://svn.roundcube.net/trunk@3644 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps/mail/compose.inc')
-rw-r--r--roundcubemail/program/steps/mail/compose.inc27
1 files changed, 5 insertions, 22 deletions
diff --git a/roundcubemail/program/steps/mail/compose.inc b/roundcubemail/program/steps/mail/compose.inc
index 50f11a361..0b18d122a 100644
--- a/roundcubemail/program/steps/mail/compose.inc
+++ b/roundcubemail/program/steps/mail/compose.inc
@@ -134,7 +134,7 @@ else
$OUTPUT->set_env('show_sig', false);
// set line length for body wrapping
-$LINE_LENGTH = $RCMAIL->config->get('line_length', 75);
+$LINE_LENGTH = $RCMAIL->config->get('line_length', 72);
if (!empty($msg_uid))
{
@@ -597,30 +597,13 @@ function rcmail_create_reply_body($body, $bodyIsHtml)
$body = substr($body, 0, max(0, $sp-1));
}
- // soft-wrap message first
- $body = rcmail_wrap_quoted($body, $LINE_LENGTH);
-
- $body = rtrim($body, "\r\n");
-
- if ($body) {
- // split body into single lines
- $a_lines = preg_split('/\r?\n/', $body);
-
- // add > to each line
- for ($n=0; $n<sizeof($a_lines); $n++) {
- if (strpos($a_lines[$n], '>')===0)
- $a_lines[$n] = '>'.$a_lines[$n];
- else
- $a_lines[$n] = '> '.$a_lines[$n];
- }
-
- $body = join("\n", $a_lines);
- }
+ // soft-wrap and quote message text
+ $body = rcmail_wrap_and_quote(rtrim($body, "\r\n"), $LINE_LENGTH);
// add title line(s)
- $prefix = rc_wordwrap(sprintf("On %s, %s wrote:\n",
+ $prefix = sprintf("On %s, %s wrote:\n",
$MESSAGE->headers->date,
- $MESSAGE->get_header('from')), $LINE_LENGTH);
+ $MESSAGE->get_header('from'));
$suffix = '';