mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 20:49:20 +03:00
Small fixes
This commit is contained in:
parent
c5bffef9cd
commit
f92120a5a7
7 changed files with 46 additions and 46 deletions
|
|
@ -512,7 +512,7 @@
|
|||
Utils.replySubjectAdd = function (sPrefix, sSubject)
|
||||
{
|
||||
sPrefix = Utils.trim(sPrefix.toUpperCase());
|
||||
sSubject = Utils.trim(sSubject.replace(/[\s]+/, ' '));
|
||||
sSubject = Utils.trim(sSubject.replace(/[\s]+/g, ' '));
|
||||
|
||||
var
|
||||
iIndex = 0,
|
||||
|
|
@ -591,7 +591,7 @@
|
|||
oMatch = null
|
||||
;
|
||||
|
||||
sSubject = Utils.trim(sSubject.replace(/[\s]+/, ' '));
|
||||
sSubject = Utils.trim(sSubject.replace(/[\s]+/g, ' '));
|
||||
|
||||
do
|
||||
{
|
||||
|
|
@ -610,7 +610,7 @@
|
|||
}
|
||||
while (oMatch || 0 < iLimit);
|
||||
|
||||
return sSubject.replace(/[\s]+/, ' ');
|
||||
return sSubject.replace(/[\s]+/g, ' ');
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -659,7 +659,7 @@
|
|||
oMatch = null
|
||||
;
|
||||
|
||||
sSubject = Utils.trim(sSubject.replace(/[\s]+/, ' '));
|
||||
sSubject = Utils.trim(sSubject.replace(/[\s]+/g, ' '));
|
||||
|
||||
do
|
||||
{
|
||||
|
|
@ -681,7 +681,7 @@
|
|||
}
|
||||
while (oMatch);
|
||||
|
||||
sSubject = sSubject.replace(/[\s]+/, ' ');
|
||||
sSubject = sSubject.replace(/[\s]+/g, ' ');
|
||||
return sSubject;
|
||||
};
|
||||
|
||||
|
|
@ -1339,7 +1339,7 @@
|
|||
Utils.convertLangName = function (sLanguage, bEng)
|
||||
{
|
||||
return Utils.i18n('LANGS_NAMES' + (true === bEng ? '_EN' : '') + '/LANG_' +
|
||||
sLanguage.toUpperCase().replace(/[^a-zA-Z0-9]+/, '_'), null, sLanguage);
|
||||
sLanguage.toUpperCase().replace(/[^a-zA-Z0-9]+/g, '_'), null, sLanguage);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -1522,7 +1522,7 @@
|
|||
sText = splitPlainText($.trim(sText));
|
||||
sText = '> ' + sText.replace(/\n/gm, '\n> ');
|
||||
return sText.replace(/(^|\n)([> ]+)/gm, function () {
|
||||
return (arguments && 2 < arguments.length) ? arguments[1] + $.trim(arguments[2].replace(/[\s]/, '')) + ' ' : '';
|
||||
return (arguments && 2 < arguments.length) ? arguments[1] + $.trim(arguments[2].replace(/[\s]/g, '')) + ' ' : '';
|
||||
});
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -355,8 +355,8 @@
|
|||
$sComment = Utils.trim($sComment).replace(/^[(]+/, '').replace(/[)]+$/, '');
|
||||
|
||||
// Remove backslash
|
||||
$sName = $sName.replace(/\\\\(.)/, '$1');
|
||||
$sComment = $sComment.replace(/\\\\(.)/, '$1');
|
||||
$sName = $sName.replace(/\\\\(.)/g, '$1');
|
||||
$sComment = $sComment.replace(/\\\\(.)/g, '$1');
|
||||
|
||||
this.name = $sName;
|
||||
this.email = $sEmail;
|
||||
|
|
|
|||
|
|
@ -655,18 +655,18 @@
|
|||
sSignature = sSignature.substr(6);
|
||||
}
|
||||
|
||||
sSignature = sSignature.replace(/[\r]/, '');
|
||||
sSignature = sSignature.replace(/[\r]/g, '');
|
||||
|
||||
sFrom = Utils.pString(sFrom);
|
||||
if ('' !== sFrom)
|
||||
{
|
||||
sSignature = sSignature.replace(/{{FROM}}/, sFrom);
|
||||
sSignature = sSignature.replace(/{{FROM}}/g, sFrom);
|
||||
}
|
||||
|
||||
sSignature = sSignature.replace(/[\s]{1,2}{{FROM}}/, '{{FROM}}');
|
||||
sSignature = sSignature.replace(/[\s]{1,2}{{FROM}}/g, '{{FROM}}');
|
||||
|
||||
sSignature = sSignature.replace(/{{FROM}}/, '');
|
||||
sSignature = sSignature.replace(/{{DATE}}/, moment().format('llll'));
|
||||
sSignature = sSignature.replace(/{{FROM}}/g, '');
|
||||
sSignature = sSignature.replace(/{{DATE}}/g, moment().format('llll'));
|
||||
|
||||
if (sData && Enums.ComposeType.Empty === sComposeType &&
|
||||
-1 < sSignature.indexOf('{{DATA}}'))
|
||||
|
|
@ -675,7 +675,7 @@
|
|||
sSignature = sSignature.replace('{{DATA}}', sData);
|
||||
}
|
||||
|
||||
sSignature = sSignature.replace(/{{DATA}}/, '');
|
||||
sSignature = sSignature.replace(/{{DATA}}/g, '');
|
||||
|
||||
if (!bHtml)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue