]> source.dussan.org Git - nextcloud-server.git/commitdiff
Encoded slashes (%2F) don't look pretty in our private link urls
authorMichael Gapczynski <GapczynskiM@gmail.com>
Sat, 12 May 2012 00:58:21 +0000 (20:58 -0400)
committerMichael Gapczynski <GapczynskiM@gmail.com>
Sat, 12 May 2012 00:58:21 +0000 (20:58 -0400)
apps/files_sharing/js/share.js

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