diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-03-07 08:14:41 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-03-07 08:14:41 +0000 |
| commit | b9144094df5e7285f4c58f9acd8fbdff272e7934 (patch) | |
| tree | bd0ae1455889ecff746c1bd46d0eb3c945c394ab /roundcubemail/program/js | |
| parent | c1f940769f0c64ef20c677661de2b03307cca169 (diff) | |
- Last commit fix
git-svn-id: https://svn.roundcube.net/trunk@3336 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/js')
| -rw-r--r-- | roundcubemail/program/js/app.js | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/roundcubemail/program/js/app.js b/roundcubemail/program/js/app.js index e779a9866..754954afd 100644 --- a/roundcubemail/program/js/app.js +++ b/roundcubemail/program/js/app.js @@ -2331,9 +2331,9 @@ function rcube_webmail() // remove the 'old' signature if (show_sig && this.env.identity && this.env.signatures && this.env.signatures[this.env.identity]) { sig = this.env.signatures[this.env.identity].is_html ? this.env.signatures[this.env.identity].plain_text : this.env.signatures[this.env.identity].text; - sig = sig.replace(/\r\n/, '\n'); - if (!sig.match(/^--[ -]\n/) + + if (!sig.match(/^--[ -]\n/)) sig = sig_separator + '\n' + sig; p = this.env.sig_above ? message.indexOf(sig) : message.lastIndexOf(sig); @@ -2343,7 +2343,9 @@ 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']; - if (!sig.match(/^--[ -]\n/) + sig = sig.replace(/\r\n/, '\n'); + + if (!sig.match(/^--[ -]\n/)) sig = sig_separator + '\n' + sig; if (this.env.sig_above) { @@ -2412,12 +2414,12 @@ function rcube_webmail() if (this.env.signatures[id]) { if (this.env.signatures[id].is_html) { sig = this.env.signatures[id].text; - if (!this.env.signatures[id].plain_text.match(/^--[ -]\n/) + if (!this.env.signatures[id].plain_text.match(/^--[ -]\r?\n/)) sig = sig_separator + '<br />' + sig; } else { sig = this.env.signatures[id].text; - if (!sig.match(/^--[ -]\n/) + if (!sig.match(/^--[ -]\r?\n/)) sig = sig_separator + '\n' + sig; sig = '<pre>' + sig + '</pre>'; } |
