Fixed error when trying to download album with ampersand in password #356

This commit is contained in:
Tobias Reich 2015-08-11 13:43:55 +02:00
parent 67565809f3
commit d3a87fbfbb
3 changed files with 2 additions and 2 deletions

BIN
dist/main.js vendored

Binary file not shown.

View File

@ -552,7 +552,7 @@ album.getArchive = function(albumID) {
if (location.href.indexOf('index.html')>0) link = location.href.replace(location.hash, '').replace('index.html', url)
else link = location.href.replace(location.hash, '') + url
if (lychee.publicMode===true) link += `&password=${ password.value }`
if (lychee.publicMode===true) link += `&password=${ encodeURIComponent(password.value) }`
location.href = link

View File

@ -684,7 +684,7 @@ photo.getArchive = function(photoID) {
if (location.href.indexOf('index.html')>0) link = location.href.replace(location.hash, '').replace('index.html', url)
else link = location.href.replace(location.hash, '') + url
if (lychee.publicMode===true) link += '&password=' + password.value
if (lychee.publicMode===true) link += `&password=${ encodeURIComponent(password.value) }`
location.href = link