Skip to content

Commit

Permalink
feat(mail): handle multiple mail identities
Browse files Browse the repository at this point in the history
Fixes #5083
  • Loading branch information
cgx committed Jul 21, 2020
1 parent 6f5ffed commit 8940651
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion UI/WebServerResources/js/Mailer/MessageEditorController.js
Expand Up @@ -384,7 +384,8 @@

previousIdentity = _.find(this.identities, function (currentIdentity, index) {
if (currentIdentity.signature) {
var currentSignature = new RegExp(reNl + reNl + '--' + space + reNl + currentIdentity.signature);
var currentSignature = new RegExp(reNl + reNl + '--' + space + reNl +
currentIdentity.signature.replace(/[-\[\]{}()*+?.,\\^$|#\s]/g, '\\$&'));
if (vm.message.editable.text.search(currentSignature) >= 0) {
vm.message.editable.text = vm.message.editable.text.replace(currentSignature, signature);
return true;
Expand Down

0 comments on commit 8940651

Please sign in to comment.