use encodeURIComponent in more places

remotes/origin/stable
Robin Appelman 15 years ago
parent 6642d4af6f
commit 417b1efdca
  1. 2
      js/filebrowser.js
  2. 2
      js/lib_files.js

@ -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)

@ -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]){

Loading…
Cancel
Save