summaryrefslogtreecommitdiff
path: root/roundcubemail/program
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-05-11 19:47:39 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-05-11 19:47:39 +0000
commit1d22c59cf2dacd10d21411c4d245d95d12197f41 (patch)
tree01e06bc6e5cb9bddd92170ccf03adb5501a69b5e /roundcubemail/program
parent17961a6352761d3d94ceb3567a5f6f839ba617a7 (diff)
- Fix signatures get added instead of replaced in plain text mode (#1486730)
git-svn-id: https://svn.roundcube.net/trunk@3611 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program')
-rw-r--r--roundcubemail/program/js/app.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/roundcubemail/program/js/app.js b/roundcubemail/program/js/app.js
index 5a4d34965..4e7db3256 100644
--- a/roundcubemail/program/js/app.js
+++ b/roundcubemail/program/js/app.js
@@ -2798,8 +2798,9 @@ function rcube_webmail()
if (!is_html) {
// remove the 'old' signature
if (show_sig && sig && this.env.signatures && this.env.signatures[sig]) {
+
sig = this.env.signatures[sig].is_html ? this.env.signatures[sig].plain_text : this.env.signatures[sig].text;
- sig = sig.replace(/\r\n/, '\n');
+ sig = sig.replace(/\r\n/g, '\n');
if (!sig.match(/^--[ -]\n/))
sig = sig_separator + '\n' + sig;
@@ -2811,7 +2812,7 @@ function rcube_webmail()
// add the new signature string
if (show_sig && this.env.signatures && this.env.signatures[id]) {
sig = this.env.signatures[id]['is_html'] ? this.env.signatures[id]['plain_text'] : this.env.signatures[id]['text'];
- sig = sig.replace(/\r\n/, '\n');
+ sig = sig.replace(/\r\n/g, '\n');
if (!sig.match(/^--[ -]\n/))
sig = sig_separator + '\n' + sig;
@@ -4167,7 +4168,7 @@ function rcube_webmail()
/********* GUI functionality *********/
/*********************************************************/
- // eable/disable buttons for page shifting
+ // enable/disable buttons for page shifting
this.set_page_buttons = function()
{
this.enable_command('nextpage', (this.env.pagecount > this.env.current_page));