summaryrefslogtreecommitdiffstats
path: root/files
diff options
context:
space:
mode:
authorRobin Appelman <icewind1991@gmail.com>2011-07-19 23:56:21 +0200
committerRobin Appelman <icewind1991@gmail.com>2011-07-19 23:56:21 +0200
commit332cab0c559361e7295d4a993329d610a050bf94 (patch)
treee2f130ef8f6f24854ea08a6bdc130ab102bedc6e /files
parent6cd5270967a1cd681bd98620bcbd352cc5e3f763 (diff)
downloadnextcloud-server-332cab0c559361e7295d4a993329d610a050bf94.tar.gz
nextcloud-server-332cab0c559361e7295d4a993329d610a050bf94.zip
fix deleting files with spaces in the name
Diffstat (limited to 'files')
-rw-r--r--files/js/fileactions.js2
-rw-r--r--files/js/files.js4
2 files changed, 3 insertions, 3 deletions
diff --git a/files/js/fileactions.js b/files/js/fileactions.js
index 1bdbc4ac0bb..b683dc0cd3a 100644
--- a/files/js/fileactions.js
+++ b/files/js/fileactions.js
@@ -86,7 +86,7 @@ FileActions.register('all','Download',function(filename){
FileActions.register('all','Delete',function(filename){
$.ajax({
url: 'ajax/delete.php',
- data: "dir="+$('#dir').val()+"&file="+filename,
+ data: "dir="+encodeURIComponent($('#dir').val())+"&file="+encodeURIComponent(filename),
complete: function(data){
boolOperationFinished(data, function(){
FileList.remove(filename);
diff --git a/files/js/files.js b/files/js/files.js
index c8cef87eb94..af0c344f18d 100644
--- a/files/js/files.js
+++ b/files/js/files.js
@@ -117,7 +117,7 @@ $(document).ready(function() {
//send the browser to the download location
var dir=$('#dir').val()||'/';
// alert(files);
- window.location='ajax/download.php?files='+files+'&dir='+dir;
+ window.location='ajax/download.php?files='+encodeURIComponent(files)+'&dir='+encodeURIComponent(dir);
return false;
});
@@ -130,7 +130,7 @@ $(document).ready(function() {
$.ajax({
url: 'ajax/delete.php',
- data: "dir="+$('#dir').val()+"&files="+files,
+ data: "dir="+$('#dir').val()+"&files="+encodeURIComponent(files),
complete: function(data){
boolOperationFinished(data, function(){
$('td.selection input:checkbox:checked').parent().parent().each(function(i,element){