From dd792e8253f6fa94eba4e95293a32f8bc91289bb Mon Sep 17 00:00:00 2001
From: svncommit <devs@roundcube.net>
Date: Sun, 03 Dec 2006 17:32:16 -0500
Subject: [PATCH] fixed signature issues

---
 program/steps/mail/compose.inc |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc
index 76aa78f..6e1126b 100644
--- a/program/steps/mail/compose.inc
+++ b/program/steps/mail/compose.inc
@@ -20,6 +20,7 @@
 */
 
 require_once('Mail/mimeDecode.php');
+require_once('lib/html2text.inc');
 
 // define constants for message compose mode
 define('RCUBE_COMPOSE_REPLY', 0x0106);
@@ -296,6 +297,12 @@
         {
         $a_signatures[$identity_id]['text'] = $sql_arr['signature'];
         $a_signatures[$identity_id]['is_html'] = ($sql_arr['html_signature'] == 1) ? true : false;
+        if ($a_signatures[$identity_id]['is_html'])
+          {
+            $h2t = new html2text($a_signatures[$identity_id]['text'], false, false);
+            $plainTextPart = $h2t->get_text();
+            $a_signatures[$identity_id]['plain_text'] = trim($plainTextPart);
+          }
         }
 
       // set identity if it's one of the reply-message recipients

--
Gitblit v1.9.1