Change:
wrongly encode IPv6 literals ( This is an issue with but if I understand correctly issues should be reported here ) can parse IPv6 literal address fine (examples are using node REPL) but will encode the : This string representation of the URI cannot be used for example by a web browser. This encoding seems to happen here <!-- Do Not Delete This! bugreporttemplate --<!-- Please read our Rules of Conduct: --<!-- Read our guide about submitting issues: --<!-- Search existing issues to avoid creating duplicates. --<!-- Test using the latest Insiders build to see if your issue has already been fixed: --<!-- Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. --<!-- Launch with to check. --Does this issue occur when all extensions are disabled?: not applicable <!-- If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. --<!-- Issues caused by an extension need to be reported directly to the extension publisher. The 'Help Report Issue' dialog can assist with this. --- VS Code Version: main ( ) OS Version: linux Steps to Reproduce: actual: expected:
Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.68.1. Please try upgrading to the latest version and checking whether this issue remains. Happy Coding!
Looks similar to:

Discussion:
[CharCode.Space]: '%20', }; <del> function encodeURIComponentFast(uriComponent: string, allowSlash: boolean): string { </del> <ins> function encodeURIComponentFast(uriComponent: string, isPath: boolean, isAuthority: boolean): string { </ins> let res: string | undefined = undefined; let nativeEncodePos = -1;

|| code === CharCode.Period || code === CharCode.Underline || code === CharCode.Tilde <del> || (allowSlash && code === CharCode.Slash) </del> <ins> || (isPath && code === CharCode.Slash) || (isAuthority && code === CharCode.OpenSquareBracket) || (isAuthority && code === CharCode.CloseSquareBracket) || (isAuthority && code === CharCode.Colon) </ins> ) { // check if we are delaying native encode if (nativeEncodePos !== -1) {

// <user>@<auth> const userinfo = authority.substr(0, idx); authority = authority.substr(idx + 1); <del> idx = userinfo.indexOf(':'); </del> <ins> idx = userinfo.lastIndexOf(':'); </ins> if (idx === -1) { <del> res += encoder(userinfo, false); </del> <ins> res += encoder(userinfo, false, false); </ins> } else { // <user>:<pass>@<auth> <del> res += encoder(userinfo.substr(0, idx), false); </del> <ins> res += encoder(userinfo.substr(0, idx), false, false); </ins> res += ':'; <del> res += encoder(userinfo.substr(idx + 1), false); </del> <ins> res += encoder(userinfo.substr(idx + 1), false, true); </ins> } res += '@'; } authority = authority.toLowerCase(); <del> idx = authority.indexOf(':'); </del> <ins> idx = authority.lastIndexOf(':'); </ins> if (idx === -1) { <del> res += encoder(authority, false); </del> <ins> res += encoder(authority, false, true); </ins> } else { // <auth>:<port> <del> res += encoder(authority.substr(0, idx), false); </del> <ins> res += encoder(authority.substr(0, idx), false, true); </ins> res += authority.substr(idx); } }

} } // encode the rest of the path <del> res += encoder(path, true); </del> <ins> res += encoder(path, true, false); </ins> } if (query) { res += '?'; <del> res += encoder(query, false); </del> <ins> res += encoder(query, false, false); </ins> } if (fragment) { res += '#'; <del> res += !skipEncoding ? encodeURIComponentFast(fragment, false) : fragment; </del> <ins> res += !skipEncoding ? encodeURIComponentFast(fragment, false, false) : fragment; </ins> } return res; }

}), true); }); <del> test('Unable to open '%A0.txt': URI malformed #76506', function () { </del> <ins> test('Unable to open '%A0.txt': URI malformed #76506, part 2', function () { </ins> assert.strictEqual(URI.parse('file://some/%.txt').toString(), 'file://some/%25.txt'); assert.strictEqual(URI.parse('file://some/%A0.txt').toString(), 'file://some/%25A0.txt'); });

//https://github.com/microsoft/vscode/issues/93831 assertJoined('file:///c:/foo/bar', './other/foo.img', 'file:///c:/foo/bar/other/foo.img', false); }); <ins> test('vscode-uri: URI.toString() wrongly encode IPv6 literals #154048', function () { assert.strictEqual(URI.parse('http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html').toString(), 'http://[fedc:ba98:7654:3210:fedc:ba98:7654:3210]:80/index.html'); assert.strictEqual(URI.parse('http://user@[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html').toString(), 'http://user@[fedc:ba98:7654:3210:fedc:ba98:7654:3210]:80/index.html'); assert.strictEqual(URI.parse('http://us[er@[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html').toString(), 'http://us%5Ber@[fedc:ba98:7654:3210:fedc:ba98:7654:3210]:80/index.html'); }); </ins> });