Browse Source

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

Tobias Reich 8 years ago
parent
commit
d3a87fbfbb
3 changed files with 2 additions and 2 deletions
  1. 0 0
      dist/main.js
  2. 1 1
      src/scripts/album.js
  3. 1 1
      src/scripts/photo.js

File diff suppressed because it is too large
+ 0 - 0
dist/main.js


+ 1 - 1
src/scripts/album.js

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

+ 1 - 1
src/scripts/photo.js

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

Some files were not shown because too many files changed in this diff