]> source.dussan.org Git - nextcloud-server.git/commitdiff
files_imageviewer: Double encode paths. Fixes oc-1016.
authorThomas Tanghus <thomas@tanghus.net>
Sat, 16 Jun 2012 16:54:55 +0000 (18:54 +0200)
committerThomas Tanghus <thomas@tanghus.net>
Sat, 16 Jun 2012 16:57:51 +0000 (18:57 +0200)
apps/files_imageviewer/js/lightbox.js

index 69cda7a0eccac5164515afe0a6d6f24dc14a10eb..31f08456d22bf764f726aa63ad5e78bd8fd81315 100644 (file)
@@ -22,7 +22,7 @@ function viewImage(dir, file) {
        if(file.indexOf('.psd')>0){//can't view those
                return;
        }
-       var location=OC.filePath('files','ajax','download.php')+'?files='+encodeURIComponent(file)+'&dir='+encodeURIComponent(dir);
+       var location=OC.filePath('files','ajax','download.php')+encodeURIComponent('?files='+encodeURIComponent(file)+'&dir='+encodeURIComponent(dir));
        $.fancybox({
                "href": location,
                "title": file.replace(/</, "&lt;").replace(/>/, "&gt;"),