From 8e7f32fddc7eb5752c30c97005c71cf102cb5021 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Thu, 15 Oct 2015 12:23:23 +0200 Subject: [PATCH] Small improvements in HTML to text conversion. Better handling of and trailing spaces, and

or
. --- program/lib/Roundcube/rcube_html2text.php | 24 ++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/program/lib/Roundcube/rcube_html2text.php b/program/lib/Roundcube/rcube_html2text.php index c67dc8e5e..8072c3e9e 100644 --- a/program/lib/Roundcube/rcube_html2text.php +++ b/program/lib/Roundcube/rcube_html2text.php @@ -136,12 +136,15 @@ class rcube_html2text * @see $replace */ protected $search = array( - "/\r/", // Non-legal carriage return - "/[\n\t]+/", // Newlines and tabs + '/\r/', // Non-legal carriage return + '/^.*]*>\n*/i', // Anything before '/]*>.*?<\/head>/i', // - '/]*>.*?<\/script>/i', //