]> source.dussan.org Git - nextcloud-server.git/commitdiff
use encodeURIComponent in more places
authorRobin Appelman <icewind1991@gmail.com>
Tue, 3 Aug 2010 15:35:59 +0000 (17:35 +0200)
committerRobin Appelman <icewind1991@gmail.com>
Tue, 3 Aug 2010 15:35:59 +0000 (17:35 +0200)
js/filebrowser.js
js/lib_files.js

index aae6cdf7720b4cad86b05e913a1be111bc9ae023..1ad37ebcf3f60bfe2304eb3d29ed36f7d9473a3f 100644 (file)
@@ -555,7 +555,7 @@ sizeFormat=function(size){
 }
 
 OC_FILES.browser.showImage=function(dir,file){
-       var path=WEBROOT+'/files/open_file.php?dir='+dir+'&file='+file
+       var path=WEBROOT+'/files/open_file.php?dir='+encodeURIComponent(dir)+'&file='+encodeURIComponent(file);
        var div=document.createElement('div');
        div.setAttribute('id','imageframe');
        div.addEvent('onclick',OC_FILES.browser.hideImage)
index 68c3c61129105c37663413add3ca4cfb5a505605..0f601cff65d7b7aad318cf8035895f2955400519 100644 (file)
@@ -75,7 +75,7 @@ OC_FILES.getdirectorycontent=function(dir,callback,refresh){
                        OC_FILES.getdirectorycontent_callback=callback;
                }
                OC_FILES.xmlloader.setCallBack(OC_FILES.getdirectorycontent_parse);
-               OC_FILES.xmlloader.load('files/get_files.php?dir='+dir);
+               OC_FILES.xmlloader.load('files/get_files.php?dir='+encodeURIComponent(dir));
        }else{
                var files=OC_FILES.cache.files
                if(OC_FILES.cache.incomplete[OC_FILES.dir]){