encodeURI(listname) before making it part of image URLs

This commit is contained in:
rolux 2013-08-14 19:12:59 +00:00
parent ab9172526b
commit 356a4b4505
4 changed files with 5 additions and 5 deletions

View file

@ -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) {

View file

@ -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) {

View file

@ -183,7 +183,7 @@ pandora.ui.listInfo = function() {
$icon = Ox.Element('<img>')
.attr({
src: list
? '/' + folderItem.toLowerCase() + '/' + list + '/icon256.jpg?' + Ox.uid()
? '/' + folderItem.toLowerCase() + '/' + encodeURI(list) + '/icon256.jpg?' + Ox.uid()
: '/static/png/icon.png'
})
.css(getIconCSS())

View file

@ -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 = $('<img>')
.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),