summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2015-01-25 18:01:04 +0100
committerAleksander Machniak <alec@alec.pl>2015-01-25 18:01:04 +0100
commitb0c902622352713a481088104ad9adfe4a06b18e (patch)
tree7bf43719364dc46457f0ef592d789bf9b14532dc /program
parent556d288754c13141b42f0a4dd4889078265c6f45 (diff)
Fix bug where signature could have been inserted twice after plain-to-html switch (#1490239)
Diffstat (limited to 'program')
-rw-r--r--program/js/editor.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/program/js/editor.js b/program/js/editor.js
index 2fc3429ab..92165348a 100644
--- a/program/js/editor.js
+++ b/program/js/editor.js
@@ -213,8 +213,10 @@ function rcube_text_editor(config, id)
content = input.val();
// replace current text signature with temp mark
- if (is_sig)
- content = content.replace(signature.text, sig_mark);
+ if (is_sig) {
+ content = content.replace(/\r\n/, "\n");
+ content = content.replace(signature.text.replace(/\r\n/, "\n"), sig_mark);
+ }
var init_editor = function(data) {
// replace signature mark with html version of the signature