Skip to content

Commit

Permalink
Fix EZP-23086: Image thumbnail not shown on backend if alias contains…
Browse files Browse the repository at this point in the history
… 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 96aec36
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion design/admin/javascript/ezajaxsubitems_datatable.js
Expand Up @@ -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>';
Expand Down

0 comments on commit 96aec36

Please sign in to comment.