From b116b2fd4c75cb8ddf722ae13be85bbe4eae33f3 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Sun, 24 Oct 2010 13:25:21 +0200 Subject: fix uploading files to folders with special characters in the name --- js/filebrowser.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js') diff --git a/js/filebrowser.js b/js/filebrowser.js index 1ad37ebcf3f..a12a7cd715c 100644 --- a/js/filebrowser.js +++ b/js/filebrowser.js @@ -310,7 +310,7 @@ OC_FILES.browser.show_callback=function(content){ OC_FILES.browser.files.show(null,content); } if(OC_FILES.uploadForm){ - OC_FILES.uploadForm.setAttribute('action','files/upload.php?dir='+dir); + OC_FILES.uploadForm.setAttribute('action','files/upload.php?dir='+encodeURIComponent(dir)); } } @@ -423,7 +423,7 @@ OC_FILES.browser.showuploader=function(dir,parent,max_upload){ var iframeId=OC_FILES.uploadIFrames.length OC_FILES.uploadForm=document.createElement('form'); OC_FILES.uploadForm.setAttribute('target','uploadIFrame'+iframeId); - OC_FILES.uploadForm.setAttribute('action','files/upload.php?dir='+dir); + OC_FILES.uploadForm.setAttribute('action','files/upload.php?dir='+encodeURIComponent(dir)); OC_FILES.uploadForm.method='post'; OC_FILES.uploadForm.setAttribute('enctype','multipart/form-data'); OC_FILES.uploadIFrames[iframeId]=document.createElement('iframe'); -- cgit v1.2.3