From ab9172526b4a52451de49836cf62c7a15c89f292 Mon Sep 17 00:00:00 2001 From: rolux Date: Wed, 14 Aug 2013 19:09:53 +0000 Subject: [PATCH] encodeURI(listname) before making it part of image URLs --- static/js/folderBrowserList.js | 2 +- static/js/folderList.js | 2 +- static/js/listDialog.js | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/static/js/folderBrowserList.js b/static/js/folderBrowserList.js index 2bca49fa0..b037bd44f 100644 --- a/static/js/folderBrowserList.js +++ b/static/js/folderBrowserList.js @@ -15,7 +15,7 @@ pandora.ui.folderBrowserList = function(id, section) { clickable: true, format: function(value) { return $('').attr({ - src: '/list/' + value + '/icon.jpg' + src: '/list/' + encodeURI(value) + '/icon.jpg' }).css({ width: '14px', height: '14px', diff --git a/static/js/folderList.js b/static/js/folderList.js index 184f201f5..49ff54e26 100644 --- a/static/js/folderList.js +++ b/static/js/folderList.js @@ -18,7 +18,7 @@ pandora.ui.folderList = function(id, section) { }, format: function(value, data) { return $('').attr({ - src: '/' + folderItem.toLowerCase() + '/' + data.id + '/icon.jpg?' + data.modified + src: '/' + folderItem.toLowerCase() + '/' + encodeURI(data.id) + '/icon.jpg?' + data.modified }).css({ width: '14px', height: '14px', diff --git a/static/js/listDialog.js b/static/js/listDialog.js index 983ba0663..b4760535d 100644 --- a/static/js/listDialog.js +++ b/static/js/listDialog.js @@ -544,12 +544,12 @@ pandora.ui.listIconPanel = function(listData) { posterFrames: posterFrames }, function() { $icon.attr({ - src: '/' + folderItem.toLowerCase() + '/' + listData.id + '/icon256.jpg?' + Ox.uid() + src: '/' + folderItem.toLowerCase() + '/' + encodeURI(listData.id) + '/icon256.jpg?' + Ox.uid() }); pandora.$ui.folderList[listData.folder].$element - .find('img[src*="/' + listData.id + '/"]') + .find('img[src*="/' + encodeURI(listData.id) + '/"]') .attr({ - src: '/' + folderItem.toLowerCase() + '/' + listData.id + '/icon.jpg?' + Ox.uid() + src: '/' + folderItem.toLowerCase() + '/' + encodeURI(listData.id) + '/icon.jpg?' + Ox.uid() }); pandora.$ui.info.updateListInfo(); });