Fixes image name including # fail to render#84334
Conversation
| // Modern vscode-resources uris put the scheme of the requested resource as the authority | ||
| if (requestUri.authority) { | ||
| return URI.parse(requestUri.authority + ':' + requestUri.path); | ||
| return URI.parse(requestUri.authority + ':' + encodeURIComponent(requestUri.path).replace(/%2F/g, '/')); |
There was a problem hiding this comment.
Which operating system did you test this on. The change looks good but I'm not sure if it will work on windows
There was a problem hiding this comment.
What happens for windows style paths though (ones that use \)?
There was a problem hiding this comment.
I don't have a windows VM at hand to be able to build from sources and test it but looking at the uri.ts file it seems that \ characters are converted to / before constructing the uri object
vscode/src/vs/base/common/uri.ts
Lines 306 to 308 in ab147f8
and converted back again with the fsPath getter
so the requestUri.path doesn't have any \ character
|
@mjbvz I tested this today and seems that #84667 broke this again.
|
This PR fixes #84197