Skip to content

Commit

Permalink
Only allow protocol links in webview on desktop VS Code
Browse files Browse the repository at this point in the history
Fixes #79647
  • Loading branch information
mjbvz committed Aug 26, 2019
1 parent a66e9d4 commit 9f49056
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/vs/workbench/api/browser/mainThreadWebview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import { onUnexpectedError } from 'vs/base/common/errors';
import { Disposable, IDisposable } from 'vs/base/common/lifecycle';
import { isWeb } from 'vs/base/common/platform';
import { startsWith } from 'vs/base/common/strings';
import { URI, UriComponents } from 'vs/base/common/uri';
import * as modes from 'vs/editor/common/modes';
Expand Down Expand Up @@ -314,7 +315,7 @@ export class MainThreadWebviews extends Disposable implements MainThreadWebviews
if (MainThreadWebviews.standardSupportedLinkSchemes.has(link.scheme)) {
return true;
}
if (this._productService.urlProtocol === link.scheme) {
if (!isWeb && this._productService.urlProtocol === link.scheme) {
return true;
}
return !!webview.webview.contentOptions.enableCommandUris && link.scheme === 'command';
Expand Down

0 comments on commit 9f49056

Please sign in to comment.