Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/gallery.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2014-08-13 18:02:19 +0400
committerRobin Appelman <icewind@owncloud.com>2014-08-13 18:02:19 +0400
commit94a1fd19a6cde378deb66d9ea989a9e6b2b2c2dc (patch)
tree4942b1679d20346d3b14a3815de694c0014618f1
parent2add1ad3fddf175690e217aa20908d342db825db (diff)
escape paths before setting the location hashv7.0.2RC1v7.0.2
-rw-r--r--js/album.js4
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);