Aleksander Machniak
2014-05-13 f0992426d9c5af5046c76a2da86183d0c3a40084
Bring back the old behaviour where text messages without format=flowed are auto-wrapped.
Make it the default in text2html class.
3 files modified
6 ■■■■■ changed files
program/lib/Roundcube/rcube_text2html.php 2 ●●● patch | view | raw | blame | history
program/steps/mail/func.inc 3 ●●●● patch | view | raw | blame | history
tests/Framework/Text2Html.php 1 ●●●● patch | view | raw | blame | history
program/lib/Roundcube/rcube_text2html.php
@@ -49,7 +49,7 @@
        // enables format=flowed parser
        'flowed' => false,
        // enables wrapping for non-flowed text
        'wrap'   => false,
        'wrap'   => true,
        // line-break tag
        'break'  => "<br>\n",
        // prefix and suffix (wrapper element)
program/steps/mail/func.inc
@@ -874,7 +874,8 @@
 */
function rcmail_plain_body($body, $flowed = false)
{
    $text2html = new rcube_text2html($body, false, array('flowed' => $flowed));
    $options   = array('flowed' => $flowed, 'wrap' => !$flowed);
    $text2html = new rcube_text2html($body, false, $options);
    $body      = $text2html->get_html();
    return $body;
tests/Framework/Text2Html.php
@@ -19,6 +19,7 @@
            'break'  => '<br>',
            'links'  => false,
            'flowed' => false,
            'wrap'   => false,
            'space'  => '_', // replace UTF-8 non-breaking space for simpler testing
        );