diff --git a/apps/gallery/lib/tiles.php b/apps/gallery/lib/tiles.php index 2bc8d4fcce0..011168471f0 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(\''.$this->stack_name.'\');'; + return 'javascript:openNewGal(\''.\OCP\Util::sanitizeHTML($this->stack_name).'\');'; } private $tiles_array; diff --git a/apps/gallery/templates/index.php b/apps/gallery/templates/index.php index 1890552fc0c..037e53059d1 100644 --- a/apps/gallery/templates/index.php +++ b/apps/gallery/templates/index.php @@ -1,6 +1,6 @@