Skip to content
Permalink
Browse files

Fix EZP-23086: Image thumbnail not shown on backend if alias contains…

… quotes

Additional fix to also handle the case where the URL contains several simple
quotes.
  • Loading branch information...
dpobel committed Jul 23, 2014
1 parent 97e7c5e commit 96aec36a08ca0d046b1c02244c2c2eb624a22baf
Showing with 1 addition and 1 deletion.
  1. +1 −1 design/admin/javascript/ezajaxsubitems_datatable.js
@@ -62,7 +62,7 @@ var sortableSubitems = function () {
var thumbView = function(cell, record, column, data) {
var url = encodeURI(record.getData('thumbnail_url'));
if (url) {
var thBack = 'background: url(\'' + url.replace("'", "\\'") + '\') no-repeat;';
var thBack = 'background: url(\'' + url.replace(/'/g, "\\'") + '\') no-repeat;';
var thWidth = ' width: ' + record.getData('thumbnail_width') + 'px;';
var thHeight = ' height: ' + record.getData('thumbnail_height') + 'px;';
cell.innerHTML = '<div class="thumbview"><div id="thumbfield" class="thumbfield"></div><span><div style="' + thBack + thWidth + thHeight + '"></div></span></div>';

0 comments on commit 96aec36

Please sign in to comment.
You can’t perform that action at this time.