]> source.dussan.org Git - nextcloud-server.git/commitdiff
Gallery: Fix opening folders with a ' in the name
authorBart Visscher <bartv@thisnet.nl>
Fri, 22 Jun 2012 20:46:09 +0000 (22:46 +0200)
committerBart Visscher <bartv@thisnet.nl>
Fri, 22 Jun 2012 20:46:12 +0000 (22:46 +0200)
apps/gallery/js/pictures.js
apps/gallery/lib/tiles.php

index 3a79788968856a7d3ff6ce7d81c1abfabadf972e..91fbf5be967344ce3a0da1687c4adec4da16a8f7 100644 (file)
@@ -60,7 +60,7 @@ function deplode(element) {
 }
 
 function openNewGal(album_name) {
-       root = root + album_name + "/";
+       root = root + decodeURIComponent(album_name) + "/";
        var url = window.location.toString().replace(window.location.search, '');
        url = url + "?app=gallery&root="+encodeURIComponent(root);
 
index 011168471f0f5f06818a4ebe7bb97f28c7f740c9..5efe0d7a299cd09b2fcbd9eff0676e780726dc45 100644 (file)
@@ -168,7 +168,7 @@ class TileStack extends TileBase {
        }
        
        public function getOnClickAction() {
-               return 'javascript:openNewGal(\''.\OCP\Util::sanitizeHTML($this->stack_name).'\');';
+               return 'javascript:openNewGal(\''.rawurlencode($this->stack_name).'\');';
        }
 
        private $tiles_array;