diff --git a/application/Espo/Jobs/Cleanup.php b/application/Espo/Jobs/Cleanup.php index 64c94d173f..1e29a3450d 100644 --- a/application/Espo/Jobs/Cleanup.php +++ b/application/Espo/Jobs/Cleanup.php @@ -71,7 +71,7 @@ class Cleanup implements Job protected $entityManager; - protected $metedata; + protected $metadata; protected $fileManager; diff --git a/client/src/views/fields/attachment-multiple.js b/client/src/views/fields/attachment-multiple.js index 6cd01b4403..40dc3b543a 100644 --- a/client/src/views/fields/attachment-multiple.js +++ b/client/src/views/fields/attachment-multiple.js @@ -293,6 +293,8 @@ define('views/fields/attachment-multiple', 'views/fields/base', function (Dep) { }, getDownloadUrl: function (id) { + id = Handlebars.Utils.escapeExpression(id); + var url = this.getBasePath() + '?entryPoint=download&id=' + id; if (this.getUser().get('portalId')) { @@ -354,6 +356,7 @@ define('views/fields/attachment-multiple', 'views/fields/base', function (Dep) { getEditPreview: function (name, type, id) { name = Handlebars.Utils.escapeExpression(name); + id = Handlebars.Utils.escapeExpression(id); var preview = name; @@ -365,6 +368,8 @@ define('views/fields/attachment-multiple', 'views/fields/base', function (Dep) { }, addAttachmentBox: function (name, type, id, link) { + id = Handlebars.Utils.escapeExpression(id); + var $attachments = this.$attachments; var removeLink = ''+ @@ -609,6 +614,7 @@ define('views/fields/attachment-multiple', 'views/fields/base', function (Dep) { getDetailPreview: function (name, type, id) { name = Handlebars.Utils.escapeExpression(name); + id = Handlebars.Utils.escapeExpression(id); var preview = name; @@ -648,6 +654,7 @@ define('views/fields/attachment-multiple', 'views/fields/base', function (Dep) { continue; } + var line = '
' + ' ' + '' + diff --git a/client/src/views/fields/file.js b/client/src/views/fields/file.js index a0b614a883..f418588048 100644 --- a/client/src/views/fields/file.js +++ b/client/src/views/fields/file.js @@ -308,6 +308,8 @@ define('views/fields/file', 'views/fields/link', function (Dep) { } } + id = Handlebars.Utils.escapeExpression(id); + var src = this.getBasePath() + '?entryPoint=image&size=' + previewSize + '&id=' + id; var img = ''; @@ -328,6 +330,8 @@ define('views/fields/file', 'views/fields/link', function (Dep) { getEditPreview: function (name, type, id) { name = Handlebars.Utils.escapeExpression(name); + id = Handlebars.Utils.escapeExpression(id); + var preview = name; if (~this.previewTypeList.indexOf(type)) { @@ -369,6 +373,8 @@ define('views/fields/file', 'views/fields/link', function (Dep) { }, getImageUrl: function (id, size) { + id = Handlebars.Utils.escapeExpression(id); + var url = this.getBasePath() + '?entryPoint=image&id=' + id; if (size) { diff --git a/client/src/views/fields/link-multiple-with-primary.js b/client/src/views/fields/link-multiple-with-primary.js index e5c5f7045e..ec12341053 100644 --- a/client/src/views/fields/link-multiple-with-primary.js +++ b/client/src/views/fields/link-multiple-with-primary.js @@ -125,6 +125,9 @@ Espo.define('views/fields/link-multiple-with-primary', 'views/fields/link-multip addLinkHtml: function (id, name) { name = name || id; + id = Handlebars.Utils.escapeExpression(id); + name = Handlebars.Utils.escapeExpression(name); + if (this.mode == 'search') { return Dep.prototype.addLinkHtml.call(this, id, name); } @@ -132,7 +135,7 @@ Espo.define('views/fields/link-multiple-with-primary', 'views/fields/link-multip var $container = this.$el.find('.link-container'); var $el = $('