From 3fee3df88cedf7e4b97d094e2e75bd0ed5f74bdd Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Fri, 28 Mar 2014 14:55:23 -0700 Subject: [PATCH] client: use encodeURI on download links. closes #168 --- src/client/app.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client/app.js b/src/client/app.js index c963f8a..0c16c3c 100644 --- a/src/client/app.js +++ b/src/client/app.js @@ -1620,7 +1620,7 @@ function setUpPlaylistUi(){ } if (!selection.isMulti()) { var item = player.playlist.itemTable[trackId]; - $playlistMenu.find('.download').attr('href', 'library/' + item.track.file); + $playlistMenu.find('.download').attr('href', 'library/' + encodeURI(item.track.file)); } else { $playlistMenu.find('.download').attr('href', '#'); } @@ -2201,7 +2201,7 @@ function genericTreeUi($elem, options){ } } if (track) { - $libraryMenu.find('.download').attr('href', 'library/' + track.file); + $libraryMenu.find('.download').attr('href', 'library/' + encodeURI(track.file)); } else { $libraryMenu.find('.download').attr('href', '#'); }