From f09c184786313c85616985fe2a6cfabf53f06777 Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Wed, 19 Oct 2011 11:56:20 -0400
Subject: [PATCH] Add (experimental) support for some extendted PHP LDAP functions when querying VLV enabled directories

---
 program/lib/html2text.php |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/program/lib/html2text.php b/program/lib/html2text.php
index 48df459..1ab1605 100644
--- a/program/lib/html2text.php
+++ b/program/lib/html2text.php
@@ -515,6 +515,9 @@
         $text = preg_replace("/\n\s+\n/", "\n\n", $text);
         $text = preg_replace("/[\n]{3,}/", "\n\n", $text);
 
+        // remove leading empty lines (can be produced by eg. P tag on the beginning)
+        $text = preg_replace('/^\n+/', '', $text);
+
         // Wrap the text to a readable format
         // for PHP versions >= 4.0.2. Default width is 75
         // If width is 0 or less, don't wrap the text.

--
Gitblit v1.9.1