Skip to content

Commit f0a25d6

Browse files
authored
Copy Browser URI to clipboard copies a url-encoded filepath (microsoft#176304)
1 parent 1756f23 commit f0a25d6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/vs/workbench/contrib/remoteTunnel/electron-sandbox/remoteTunnel.contribution.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ export class RemoteTunnelWorkbenchContribution extends Disposable implements IWo
525525
if (connectionInfo) {
526526
const linkToOpen = that.getLinkToOpen(connectionInfo);
527527
const remoteExtension = that.serverConfiguration.extension;
528-
const linkToOpenForMarkdown = linkToOpen.toString().replace(/\)/g, '%29');
528+
const linkToOpenForMarkdown = linkToOpen.toString(false).replace(/\)/g, '%29');
529529
await notificationService.notify({
530530
severity: Severity.Info,
531531
message:
@@ -539,7 +539,7 @@ export class RemoteTunnelWorkbenchContribution extends Disposable implements IWo
539539
),
540540
actions: {
541541
primary: [
542-
new Action('copyToClipboard', localize('action.copyToClipboard', "Copy Browser Link to Clipboard"), undefined, true, () => clipboardService.writeText(linkToOpen.toString())),
542+
new Action('copyToClipboard', localize('action.copyToClipboard', "Copy Browser Link to Clipboard"), undefined, true, () => clipboardService.writeText(linkToOpen.toString(true))),
543543
new Action('showExtension', localize('action.showExtension', "Show Extension"), undefined, true, () => {
544544
return commandService.executeCommand('workbench.extensions.action.showExtensionsWithIds', [remoteExtension.extensionId]);
545545
})
@@ -680,7 +680,7 @@ export class RemoteTunnelWorkbenchContribution extends Disposable implements IWo
680680
const clipboardService = accessor.get(IClipboardService);
681681
if (that.connectionInfo) {
682682
const linkToOpen = that.getLinkToOpen(that.connectionInfo);
683-
clipboardService.writeText(linkToOpen.toString());
683+
clipboardService.writeText(linkToOpen.toString(true));
684684
}
685685

686686
}

0 commit comments

Comments
 (0)