]> source.dussan.org Git - nextcloud-server.git/commitdiff
Replace all %2F with a / in private link
authorMichael Gapczynski <GapczynskiM@gmail.com>
Mon, 14 May 2012 23:09:11 +0000 (19:09 -0400)
committerMichael Gapczynski <GapczynskiM@gmail.com>
Tue, 15 May 2012 00:21:31 +0000 (20:21 -0400)
apps/files_sharing/js/share.js

index 5b0c4ee8096a30f8e4227215f82249d51cbbdd5f..dbf5588c4e36c9867b049f5edbc6c9996eeebc53 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).replace('%2F', '/');
+                       link += '&file=' + encodeURIComponent(item).replace(/%2F/g, '/');
                } else {
                        // Disable checkbox if inside a shared parent folder
                        $('#privateLinkCheckbox').attr('disabled', 'true');