diff options
author | alecpl <alec@alec.pl> | 2011-09-20 11:09:30 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2011-09-20 11:09:30 +0000 |
commit | 3d247e85bef500e73331a3bb03e702e68cb7820d (patch) | |
tree | 8bf9249db1a344b22c784a263156cf3ec53d8421 | |
parent | 015decf8152128c976cf31f6d642f741a4226d60 (diff) |
- Do not prepend '-- ' to signature if a line '-- ' already exists in signature
-rw-r--r-- | program/js/app.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/program/js/app.js b/program/js/app.js index 44d58236e..769db0790 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -3156,7 +3156,7 @@ function rcube_webmail() sig = this.env.signatures[sig].is_html ? this.env.signatures[sig].plain_text : this.env.signatures[sig].text; sig = sig.replace(/\r\n/g, '\n'); - if (!sig.match(/^--[ -]\n/)) + if (!sig.match(/^--[ -]\n/m)) sig = sig_separator + '\n' + sig; p = this.env.sig_above ? message.indexOf(sig) : message.lastIndexOf(sig); @@ -3168,7 +3168,7 @@ function rcube_webmail() sig = this.env.signatures[id]['is_html'] ? this.env.signatures[id]['plain_text'] : this.env.signatures[id]['text']; sig = sig.replace(/\r\n/g, '\n'); - if (!sig.match(/^--[ -]\n/)) + if (!sig.match(/^--[ -]\n/m)) sig = sig_separator + '\n' + sig; if (this.env.sig_above) { @@ -3237,12 +3237,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(/^--[ -]\r?\n/)) + if (!this.env.signatures[id].plain_text.match(/^--[ -]\r?\n/m)) sig = sig_separator + '<br />' + sig; } else { sig = this.env.signatures[id].text; - if (!sig.match(/^--[ -]\r?\n/)) + if (!sig.match(/^--[ -]\r?\n/m)) sig = sig_separator + '\n' + sig; sig = '<pre>' + sig + '</pre>'; } |