only encodeURIComponent once

This commit is contained in:
Jörn Friedrich Dreyer 2013-02-09 13:07:44 +01:00
parent e928a342c4
commit 855c9480b7
1 changed files with 2 additions and 2 deletions

View File

@ -190,11 +190,11 @@ FileActions.register('all', 'Rename', OC.PERMISSION_UPDATE, function () {
FileActions.register('dir', 'Open', OC.PERMISSION_READ, '', function (filename) {
var dir = encodeURIComponent($('#dir').val()).replace(/%2F/g, '/');
var dir = $('#dir').val()
if (dir != '/') {
dir = dir + '/';
}
window.location = OC.linkTo('files', 'index.php') + '?dir=' + dir + encodeURIComponent(filename);
window.location = OC.linkTo('files', 'index.php') + '?dir=' + encodeURIComponent(dir + filename);
});
FileActions.setDefault('dir', 'Open');