diff options
author | Vincent Petry <pvince81@owncloud.com> | 2014-01-10 15:02:26 +0100 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-01-10 15:02:26 +0100 |
commit | 1042733634622b234beb52e24505d56a9883b4eb (patch) | |
tree | 4300040f44d951823645d35d98e1b263de49fd07 /apps/files_sharing/js/public.js | |
parent | b24c21b00f0116e8749f37646cc25f798992bf05 (diff) | |
download | nextcloud-server-1042733634622b234beb52e24505d56a9883b4eb.tar.gz nextcloud-server-1042733634622b234beb52e24505d56a9883b4eb.zip |
Fixed various file name escaping issues in core apps
- Refactored file tr lookup into FileList.findFileEl that uses
filterAttr to avoid escaping issues in jQuery selectors
- Fixed versions and sharing app to properly escape file names in
attributes
Diffstat (limited to 'apps/files_sharing/js/public.js')
-rw-r--r-- | apps/files_sharing/js/public.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/files_sharing/js/public.js b/apps/files_sharing/js/public.js index eacd4096ed8..2e34e6f9bc5 100644 --- a/apps/files_sharing/js/public.js +++ b/apps/files_sharing/js/public.js @@ -29,19 +29,19 @@ $(document).ready(function() { } } FileActions.register('dir', 'Open', OC.PERMISSION_READ, '', function(filename) { - var tr = $('tr').filterAttr('data-file', filename); + var tr = FileList.findFileEl(filename); if (tr.length > 0) { window.location = $(tr).find('a.name').attr('href'); } }); FileActions.register('file', 'Download', OC.PERMISSION_READ, '', function(filename) { - var tr = $('tr').filterAttr('data-file', filename); + var tr = FileList.findFileEl(filename); if (tr.length > 0) { window.location = $(tr).find('a.name').attr('href'); } }); FileActions.register('dir', 'Download', OC.PERMISSION_READ, '', function(filename) { - var tr = $('tr').filterAttr('data-file', filename); + var tr = FileList.findFileEl(filename); if (tr.length > 0) { window.location = $(tr).find('a.name').attr('href')+'&download'; } |