Fix eslint no-useless-escape in es5 files

[MAILPOET-1146]
This commit is contained in:
Pavel Dohnal
2018-03-01 12:28:47 +00:00
committed by Rostislav Wolný
parent 9af98f0afb
commit 831804d35e
4 changed files with 3 additions and 4 deletions

View File

@@ -20,7 +20,6 @@
"no-restricted-syntax": 0, "no-restricted-syntax": 0,
"no-useless-concat": 0, "no-useless-concat": 0,
"no-nested-ternary": 0, "no-nested-ternary": 0,
"no-useless-escape": 0,
"brace-style": 0, "brace-style": 0,
"space-infix-ops": 0 "space-infix-ops": 0
} }

View File

@@ -879,7 +879,7 @@ WysijaForm.Block = window.Class.create({
createBlockDroppable: function () { createBlockDroppable: function () {
info('block -> createBlockDroppable'); info('block -> createBlockDroppable');
this.element.insert({ this.element.insert({
before: '<div class=\"block_placeholder\">' + window.$('block_placeholder').innerHTML + '</div>' before: '<div class="block_placeholder">' + window.$('block_placeholder').innerHTML + '</div>'
}); });
return this.element.previous('.block_placeholder'); return this.element.previous('.block_placeholder');
}, },

View File

@@ -83,7 +83,7 @@ define('handlebars_helpers', ['handlebars'], function (Handlebars) {
return url + value; return url + value;
}); });
Handlebars.registerHelper('emailFromMailto', function (value) { Handlebars.registerHelper('emailFromMailto', function (value) {
var mailtoMatchingRegex = /^mailto\:/i; var mailtoMatchingRegex = /^mailto:/i;
if (typeof value === 'string' && value.match(mailtoMatchingRegex)) { if (typeof value === 'string' && value.match(mailtoMatchingRegex)) {
return value.replace(mailtoMatchingRegex, ''); return value.replace(mailtoMatchingRegex, '');
} }

View File

@@ -165,7 +165,7 @@ define(
email = test[1].trim(); email = test[1].trim();
} }
// test for valid characters using WP's rule (https://core.trac.wordpress.org/browser/tags/4.7.3/src/wp-includes/formatting.php#L2902) // test for valid characters using WP's rule (https://core.trac.wordpress.org/browser/tags/4.7.3/src/wp-includes/formatting.php#L2902)
if (!/^[a-zA-Z0-9!#$%&\'*+\/=?^_`{|}~\.\-@]+$/.test(email)) { if (!/^[a-zA-Z0-9!#$%&'*+/=?^_`{|}~.-@]+$/.test(email)) {
return false; return false;
} }
return email; return email;