From 2e6e1544757c3ef9e12314bfc99b2f09e7b397d9 Mon Sep 17 00:00:00 2001 From: Bart Visscher Date: Fri, 22 Jun 2012 22:46:09 +0200 Subject: [PATCH] Gallery: Fix opening folders with a ' in the name --- apps/gallery/js/pictures.js | 2 +- apps/gallery/lib/tiles.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/gallery/js/pictures.js b/apps/gallery/js/pictures.js index 3a79788968..91fbf5be96 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 011168471f..5efe0d7a29 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;