summaryrefslogtreecommitdiffstats
path: root/files
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2012-04-10 13:53:27 +0200
committerArthur Schiwon <blizzz@owncloud.com>2012-04-10 13:53:27 +0200
commit0c56f82db5f00601841341909028a0cc36ca2bf1 (patch)
tree72f48f25f97e1f9e1635081397be841c8a07ce62 /files
parent6cf3f10d3546eda09ceb823af5c2cf1190f18743 (diff)
downloadnextcloud-server-0c56f82db5f00601841341909028a0cc36ca2bf1.tar.gz
nextcloud-server-0c56f82db5f00601841341909028a0cc36ca2bf1.zip
fix: drag'n'drop actions with files containing special chars, fixes oc-420
Diffstat (limited to 'files')
-rw-r--r--files/js/files.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/files/js/files.js b/files/js/files.js
index df9f45a7af4..1c0a40c2368 100644
--- a/files/js/files.js
+++ b/files/js/files.js
@@ -417,7 +417,7 @@ var folderDropOptions={
var dir=$('#dir').val();
$.ajax({
url: 'ajax/move.php',
- data: "dir="+dir+"&file="+file+'&target='+dir+'/'+target,
+ data: "dir="+encodeURIComponent(dir)+"&file="+encodeURIComponent(file)+'&target='+encodeURIComponent(dir)+'/'+encodeURIComponent(target),
complete: function(data){boolOperationFinished(data, function(){
var el = $('#fileList tr').filterAttr('data-file',file).find('td.filename');
el.draggable('destroy');
@@ -443,7 +443,7 @@ var crumbDropOptions={
}
$.ajax({
url: 'ajax/move.php',
- data: "dir="+dir+"&file="+file+'&target='+target,
+ data: "dir="+encodeURIComponent(dir)+"&file="+encodeURIComponent(file)+'&target='+encodeURIComponent(target),
complete: function(data){boolOperationFinished(data, function(){
FileList.remove(file);
});}