Replace all %2F with a / in private link

This commit is contained in:
Michael Gapczynski 2012-05-14 19:09:11 -04:00
parent 583dce5276
commit 5cf42b88af
1 changed files with 1 additions and 1 deletions

View File

@ -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).replace('%2F', '/'); link += '&file=' + encodeURIComponent(item).replace(/%2F/g, '/');
} 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');