From 6e9f9fb9e62702e786329a370466ce620b4ebac2 Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Wed, 08 Apr 2009 14:39:23 -0400
Subject: [PATCH] - Fix adding signature separator in html mode (#1485350)

---
 CHANGELOG         |    1 +
 program/js/app.js |    7 +++++++
 2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/CHANGELOG b/CHANGELOG
index 23606e0..ee805d1 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,7 @@
 CHANGELOG RoundCube Webmail
 ===========================
 
+- Fix adding signature separator in html mode (#1485350)
 - Fix opening attachment marks message as read (#1485803)
 - Fix 'temp_dir' does not support relative path under Windows (#1484529)
 - Fix "Initialize Database" button missing from installer (#1485802)
diff --git a/program/js/app.js b/program/js/app.js
index 7f1e724..51cce5d 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -2210,6 +2210,13 @@
 	  {
 	  newsig = this.env.signatures[id]['text'];
 	  htmlsig = this.env.signatures[id]['is_html'];
+        
+	  if (newsig) {
+	    if (htmlsig && this.env.signatures[id]['plain_text'].indexOf('-- ')!=0)
+              newsig = '<p>-- </p>' + newsig;
+	    else if (!htmlsig && newsig.indexOf('-- ')!=0)
+              newsig = '-- \n' + newsig;
+	    }
 	  }
 
         if (htmlsig)

--
Gitblit v1.9.1