mirror of
https://github.com/microsoft/vscode.git
synced 2026-09-26 18:06:43 +01:00
Support schemes with - in the name, such as vscode-remote
This commit is contained in:
@@ -54,7 +54,7 @@ export class IFrameWebview extends BaseWebview<HTMLIFrameElement> implements Web
|
||||
this._register(this.on(WebviewMessageChannels.loadResource, (entry: any) => {
|
||||
const rawPath = entry.path;
|
||||
const normalizedPath = decodeURIComponent(rawPath);
|
||||
const uri = URI.parse(normalizedPath.replace(/^\/(\w+)\/(.+)$/, (_, scheme, path) => scheme + ':/' + path));
|
||||
const uri = URI.parse(normalizedPath.replace(/^\/([\w\-]+)\/(.+)$/, (_, scheme, path) => scheme + ':/' + path));
|
||||
this.loadResource(rawPath, uri);
|
||||
}));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user