From 91dc7fabbc15c1e3dc932da327bbd052149ab8af 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 a2f62880e..d20d7b7f5 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', //
- '/