Browse Source

Encoded slashes (%2F) don't look pretty in our private link urls

remotes/origin/stable4
Michael Gapczynski 14 years ago
parent
commit
b4e7c05959
  1. 2
      apps/files_sharing/js/share.js

2
apps/files_sharing/js/share.js

@ -181,7 +181,7 @@ OC.Share={
$('#privateLinkCheckbox').attr('checked', true); $('#privateLinkCheckbox').attr('checked', true);
var link = parent.location.protocol+'//'+location.host+OC.linkTo('', 'public.php')+'?service=files&token='+token; var link = parent.location.protocol+'//'+location.host+OC.linkTo('', 'public.php')+'?service=files&token='+token;
if (token.indexOf('&path=') == -1) { if (token.indexOf('&path=') == -1) {
link += '&file=' + encodeURIComponent(item);
link += '&file=' + encodeURIComponent(item).replace('%2F', '/');
} else { } else {
// Disable checkbox if inside a shared parent folder // Disable checkbox if inside a shared parent folder
$('#privateLinkCheckbox').attr('disabled', 'true'); $('#privateLinkCheckbox').attr('disabled', 'true');

Loading…
Cancel
Save