Files
vscode/src/vs/workbench/api/common/shared
Matt Bierner 649dd18019 Try to encode authority for asWebviewUri
Fixes #123494

This change attempts to address issues where `asWebviewUri` could create an valid uri but an invalid http uri. This issue appears to be when the host contains a forbidden character (even if it is percent encoded): https://url.spec.whatwg.org/#forbidden-host-code-point

Having one of these characters in the host causes the url to become invalid, resulting in network requests never being made

To fix this, I've added a very simple (poor) encoding mechanism for the authority. I went with my own mechanism over something like base64 because base64 can output `/` and it's also not easy to use across both node and browsers. I also considered base62 and punycode, but both of these would be best to pull in libraries for
2021-08-09 11:24:35 -07:00
..