Fix no-cond-assign in ES5
[MAILPOET-1033]
This commit is contained in:
@@ -35,7 +35,6 @@
|
||||
"new-cap": 0,
|
||||
"no-continue": 0,
|
||||
"no-new": 0,
|
||||
"no-cond-assign": 0,
|
||||
"space-unary-ops": 0,
|
||||
"no-redeclare": 0,
|
||||
"no-console": 0,
|
||||
|
@@ -143,7 +143,8 @@ define('date',
|
||||
var convertedFormat = [];
|
||||
var escapeToken = false;
|
||||
|
||||
for(var index = 0, token = ''; token = format.charAt(index); index++){
|
||||
for(var index = 0, token = ''; format.charAt(index); index += 1){
|
||||
token = format.charAt(index);
|
||||
if (escapeToken === true) {
|
||||
convertedFormat.push('['+token+']');
|
||||
escapeToken = false;
|
||||
|
@@ -315,11 +315,13 @@ define(
|
||||
// remove urlencoded characters
|
||||
.replace(/\s+|%\d+|,+/g, '');
|
||||
// detect e-mails that will be otherwise rejected by email regex
|
||||
if (test = /<(.*?)>/.exec(email)) {
|
||||
test = /<(.*?)>/.exec(email);
|
||||
if (test) {
|
||||
// is the email inside angle brackets (e.g., 'some@email.com <some@email.com>')?
|
||||
email = test[1].trim();
|
||||
}
|
||||
if (test = /mailto:(?:\s+)?(.*)/.exec(email)) {
|
||||
test = /mailto:(?:\s+)?(.*)/.exec(email);
|
||||
if (test) {
|
||||
// is the email in 'mailto:email' format?
|
||||
email = test[1].trim();
|
||||
}
|
||||
|
Reference in New Issue
Block a user