-
Notifications
You must be signed in to change notification settings - Fork 38.4k
Description
Does this issue occur when all extensions are disabled?: Yes/No
Version: 1.64.0-insider
Commit: 7ae7f9d
Date: 2022-01-18T05:25:31.041Z (8 hrs ago)
Electron: 13.5.2
Chromium: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Darwin arm64 21.2.0
This issue relates to extension development, not the normal use of VS Code.
Steps to Reproduce:
-
Have a URL with an encoded hash in it (it must be encoded otherwise it would be the start of the Uri fragment)
-
call
vscode.commands.executeCommand( 'vscode.open', vscode.Uri.parse('https://gitlab.com/viktomas/test-project/-/tree/test-%23-hash'), );
-
VS Code tries to open
https://gitlab.com/viktomas/test-project/-/tree/test-%2523-hashin the browser (it escaped the%character from%23) (I tried to set both Firefox and Safari as the default browser and the issue happens for both) -
The same issue happens if the escaped hash is in the
querypart of the Uri
Running vscode.Uri.parse('https://gitlab.com/viktomas/test-project/-/tree/test-%23-hash').toString() returns https://gitlab.com/viktomas/test-project/-/tree/test-%23-hash which is correct so there must be some additional double-escaping in the VS Code opener.
From the normal user perspective:
When the hash-encoded URL is somewhere in the text editor and you command-click on it, it works well