alecpl
2010-09-29 6d1ae078c992af000c262df0ab6a12c608122ca9
program/include/rcube_message.php
@@ -4,8 +4,8 @@
 +-----------------------------------------------------------------------+
 | program/include/rcube_message.php                                     |
 |                                                                       |
 | This file is part of the RoundCube Webmail client                     |
 | Copyright (C) 2008-2010, RoundCube Dev. - Switzerland                 |
 | This file is part of the Roundcube Webmail client                     |
 | Copyright (C) 2008-2010, Roundcube Dev. - Switzerland                 |
 | Licensed under the GNU GPL                                            |
 |                                                                       |
 | PURPOSE:                                                              |
@@ -612,7 +612,8 @@
                $q = strlen(str_replace(' ', '', $regs[0]));
                $line = substr($line, strlen($regs[0]));
                if ($q == $q_level && isset($text[$last])
                if ($q == $q_level && $line
                    && isset($text[$last])
                    && $text[$last][strlen($text[$last])-1] == ' '
                ) {
                    $text[$last] .= $line;
@@ -631,7 +632,7 @@
                    // remove space-stuffing
                    $line = preg_replace('/^\s/', '', $line);
                    if (isset($text[$last])
                    if (isset($text[$last]) && $line
                        && $text[$last] != '-- '
                        && $text[$last][strlen($text[$last])-1] == ' '
                    ) {
@@ -666,7 +667,7 @@
                    $line  = rtrim(substr($line, $level));
                    $line  = $prefix . rc_wordwrap($line, $length - $level - 2, " \r\n$prefix ");
                }
                else {
                else if ($line) {
                    $line = ' ' . rc_wordwrap(rtrim($line), $length - 2, " \r\n ");
                }