diff --git a/packages/mini-browser/src/browser/mini-browser-open-handler.ts b/packages/mini-browser/src/browser/mini-browser-open-handler.ts index be664c324116d..95df96ff5d865 100644 --- a/packages/mini-browser/src/browser/mini-browser-open-handler.ts +++ b/packages/mini-browser/src/browser/mini-browser-open-handler.ts @@ -159,7 +159,12 @@ export class MiniBrowserOpenHandler extends NavigatableWidgetOpenHandler { const { scheme } = uri; - return scheme === 'http' || scheme === 'https' || (scheme === 'file' && uri.toString().endsWith('.html')); + const uriStr = uri.toString(); + return scheme === 'http' + || scheme === 'https' + || (scheme === 'file' + && (uriStr.endsWith('html') || uriStr.endsWith('.htm')) + ); } protected async defaultOptions(): Promise { diff --git a/packages/mini-browser/src/node/mini-browser-endpoint.ts b/packages/mini-browser/src/node/mini-browser-endpoint.ts index bdb22d8b28a58..ae3a1a4721a5a 100644 --- a/packages/mini-browser/src/node/mini-browser-endpoint.ts +++ b/packages/mini-browser/src/node/mini-browser-endpoint.ts @@ -198,8 +198,8 @@ const CODE_EDITOR_PRIORITY = 100; @injectable() export class HtmlHandler implements MiniBrowserEndpointHandler { - supportedExtensions(): string { - return 'html'; + supportedExtensions(): string[] { + return ['html', 'xhtml', 'htm']; } priority(): number {