From 356a4b450580eb3772467647115ef44068607a48 Mon Sep 17 00:00:00 2001 From: rolux Date: Wed, 14 Aug 2013 19:12:59 +0000 Subject: [PATCH] encodeURI(listname) before making it part of image URLs --- static/js/home.indiancinema.js | 2 +- static/js/home.padma.js | 2 +- static/js/info.js | 2 +- static/js/listDialog.js | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/static/js/home.indiancinema.js b/static/js/home.indiancinema.js index 741daadb2..e0156a377 100644 --- a/static/js/home.indiancinema.js +++ b/static/js/home.indiancinema.js @@ -589,7 +589,7 @@ pandora.ui.home = function() { function getImageURL(item) { return '/' + item.type + '/' + item.user - + ':' + item.name + '/icon256.jpg?' + item.modified; + + ':' + encodeURI(item.name) + '/icon256.jpg?' + item.modified; } function getTooltip(item) { diff --git a/static/js/home.padma.js b/static/js/home.padma.js index b35d97560..fe44da693 100644 --- a/static/js/home.padma.js +++ b/static/js/home.padma.js @@ -561,7 +561,7 @@ pandora.ui.home = function() { function getImageURL(item) { return '/' + item.type + '/' + item.user - + ':' + item.name + '/icon256.jpg?' + item.modified; + + ':' + encodeURI(item.name) + '/icon256.jpg?' + item.modified; } function getTooltip(item) { diff --git a/static/js/info.js b/static/js/info.js index 2b1e82d96..df86f632d 100644 --- a/static/js/info.js +++ b/static/js/info.js @@ -183,7 +183,7 @@ pandora.ui.listInfo = function() { $icon = Ox.Element('') .attr({ src: list - ? '/' + folderItem.toLowerCase() + '/' + list + '/icon256.jpg?' + Ox.uid() + ? '/' + folderItem.toLowerCase() + '/' + encodeURI(list) + '/icon256.jpg?' + Ox.uid() : '/static/png/icon.png' }) .css(getIconCSS()) diff --git a/static/js/listDialog.js b/static/js/listDialog.js index b4760535d..aee2100f4 100644 --- a/static/js/listDialog.js +++ b/static/js/listDialog.js @@ -168,7 +168,7 @@ pandora.ui.listGeneralPanel = function(listData) { tooltip: Ox._('Doubleclick to edit icon') }) .attr({ - src: '/' + folderItem.toLowerCase() + '/' + listData.id + '/icon256.jpg?' + Ox.uid() + src: '/' + folderItem.toLowerCase() + '/' + encodeURI(listData.id) + '/icon256.jpg?' + Ox.uid() }) .css({ position: 'absolute', @@ -358,7 +358,7 @@ pandora.ui.listIconPanel = function(listData) { $iconPanel = Ox.Element(), $icon = $('') - .attr({src: '/' + folderItem.toLowerCase() + '/' + listData.id + '/icon256.jpg?' + Ox.uid()}) + .attr({src: '/' + folderItem.toLowerCase() + '/' + encodeURI(listData.id) + '/icon256.jpg?' + Ox.uid()}) .css({position: 'absolute', borderRadius: '64px', margin: '16px'}) .appendTo($iconPanel),