Replaced "contains" by "indexOf" (chrome issue)

- added public ajax routing (not checking permissions)
- exception handling in form subscription
This commit is contained in:
Jonathan Labreuille
2016-03-01 13:18:36 +01:00
parent c721843c12
commit 82ed7e51c5
4 changed files with 32 additions and 16 deletions

View File

@@ -119,14 +119,14 @@ define('date',
let outputFormat = '';
Object.keys(replacements).forEach(function (key) {
if (format.contains(key)) {
Object.keys(replacements).forEach(function(key) {
if (format.indexOf(key) !== -1) {
format = format.replace(key, '%'+key);
}
});
outputFormat = format;
Object.keys(replacements).forEach(function(key) {
if (outputFormat.contains('%'+key)) {
if (outputFormat.indexOf('%'+key) !== -1) {
outputFormat = outputFormat.replace('%'+key, replacements[key]);
}
});