diff --git a/packages/plugin-ext/src/main/browser/webview/webview.ts b/packages/plugin-ext/src/main/browser/webview/webview.ts index ff2d3b61e623c..39491a2d5c031 100644 --- a/packages/plugin-ext/src/main/browser/webview/webview.ts +++ b/packages/plugin-ext/src/main/browser/webview/webview.ts @@ -487,7 +487,7 @@ export class WebviewWidget extends BaseWidget implements StatefulWidget { protected normalizeRequestUri(requestPath: string): URI { const normalizedPath = decodeURIComponent(requestPath); - const requestUri = new URI(normalizedPath.replace(/^\/(\w+)\/(.+)$/, (_, scheme, path) => scheme + ':/' + path)); + const requestUri = new URI(normalizedPath.replace(/^\/([a-zA-Z0-9.\-+]+)\/(.+)$/, (_, scheme, path) => scheme + ':/' + path)); if (requestUri.scheme !== 'theia-resource' && requestUri.scheme !== 'vscode-resource') { return requestUri; }