Bring back the old behaviour where text messages without format=flowed are auto-wrapped.

Make it the default in text2html class.
pull/191/head
Aleksander Machniak 11 years ago
parent 1053ae5e72
commit f0992426d9

@ -49,7 +49,7 @@ class rcube_text2html
// 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)

@ -874,7 +874,8 @@ function rcmail_print_body($part, $p = array())
*/
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;

@ -19,6 +19,7 @@ class Framework_Text2Html extends PHPUnit_Framework_TestCase
'break' => '<br>',
'links' => false,
'flowed' => false,
'wrap' => false,
'space' => '_', // replace UTF-8 non-breaking space for simpler testing
);

Loading…
Cancel
Save