diff --git a/vscode/src/vs/editor/browser/services/openerService.ts b/vscode/src/vs/editor/browser/services/openerService.ts index ffb075f20b51d..dda4627ecca7b 100644 --- a/vscode/src/vs/editor/browser/services/openerService.ts +++ b/vscode/src/vs/editor/browser/services/openerService.ts @@ -224,8 +224,8 @@ export class OpenerService implements IOpenerService { // open the url-string AS IS href = resource; } else { - // open URI using the toString(noEncode)+encodeURI-trick - href = encodeURI(externalUri.toString(true)); + // open URI via "new URL(...).href encoding" + href = new URL(externalUri.toString(true)).href; } if (options?.allowContributedOpeners) {