mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-27 19:19:21 +03:00
Remove signature trimming (fixed #62)
This commit is contained in:
parent
74ad0e2ca1
commit
b23551406e
4 changed files with 24 additions and 10 deletions
|
|
@ -565,10 +565,17 @@ PopupsComposeViewModel.prototype.onHide = function ()
|
|||
kn.routeOn();
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {string} sSignature
|
||||
* @param {string=} sFrom
|
||||
* @return {string}
|
||||
*/
|
||||
PopupsComposeViewModel.prototype.convertSignature = function (sSignature, sFrom)
|
||||
{
|
||||
if ('' !== sSignature)
|
||||
{
|
||||
sSignature = sSignature.replace(/[\r]/, '');
|
||||
|
||||
sFrom = Utils.pString(sFrom);
|
||||
if ('' !== sFrom)
|
||||
{
|
||||
|
|
@ -576,10 +583,10 @@ PopupsComposeViewModel.prototype.convertSignature = function (sSignature, sFrom)
|
|||
}
|
||||
else
|
||||
{
|
||||
sSignature = sSignature.replace(/{{IF:FROM}}[\s\S]+{{\/IF:FROM}}/gm, '');
|
||||
sSignature = sSignature.replace(/{{IF:FROM}}[\s\S]+{{\/IF:FROM}}[\n]?/gm, '');
|
||||
}
|
||||
|
||||
sSignature = "\r\n" + Utils.trim(sSignature.replace(/{{FROM}}/, '').replace(/{{IF:FROM}}/, '').replace(/{{\/IF:FROM}}/, ''));
|
||||
sSignature = sSignature.replace(/{{FROM}}[\n]?/, '').replace(/{{IF:FROM}}[\n]?/, '').replace(/{{\/IF:FROM}}[\n]?/, '');
|
||||
}
|
||||
|
||||
return sSignature;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue