diff --git a/apps/gallery/js/pictures.js b/apps/gallery/js/pictures.js index 3a797889688..91fbf5be967 100644 --- a/apps/gallery/js/pictures.js +++ b/apps/gallery/js/pictures.js @@ -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); diff --git a/apps/gallery/lib/tiles.php b/apps/gallery/lib/tiles.php index 011168471f0..5efe0d7a299 100644 --- a/apps/gallery/lib/tiles.php +++ b/apps/gallery/lib/tiles.php @@ -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;