diff options
author | Robin Appelman <icewind@owncloud.com> | 2014-08-13 18:02:19 +0400 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2014-08-13 18:02:19 +0400 |
commit | 94a1fd19a6cde378deb66d9ea989a9e6b2b2c2dc (patch) | |
tree | 4942b1679d20346d3b14a3815de694c0014618f1 | |
parent | 2add1ad3fddf175690e217aa20908d342db825db (diff) |
-rw-r--r-- | js/album.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/js/album.js b/js/album.js index 269a10a0..23fb2e18 100644 --- a/js/album.js +++ b/js/album.js @@ -69,7 +69,7 @@ Album.prototype.getDom = function(targetHeight) { var album = this; return this.getThumbnail().then(function(img) { - var a = $('<a/>').addClass('album').attr('href', '#' + album.path); + var a = $('<a/>').addClass('album').attr('href', '#' + encodeURI(album.path)); a.append($('<label/>').text(album.name)); var ratio = Math.round(img.ratio * 100) / 100; @@ -210,7 +210,7 @@ GalleryImage.prototype.getDom = function (targetHeight) { if (this.domDef === null || this.domHeigth !== targetHeight) { this.domHeigth = targetHeight; this.domDef = this.getThumbnail().then(function (img) { - var a = $('<a/>').addClass('image').attr('href', '#' + image.src).attr('data-path', image.path); + var a = $('<a/>').addClass('image').attr('href', '#' + encodeURI(image.src)).attr('data-path', image.path); img.height = targetHeight; img.width = targetHeight * img.ratio; console.log(targetHeight * img.ratio); |