Skip to content

Commit

Permalink
Allow file and vscode-remote schemes for links in markdown (#80573)
Browse files Browse the repository at this point in the history
Fixes #80352
  • Loading branch information
mjbvz authored Sep 9, 2019
1 parent ace2bfc commit e0c1ddf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/vs/base/browser/markdownRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { parse } from 'vs/base/common/marshalling';
import { cloneAndChange } from 'vs/base/common/objects';
import { escape } from 'vs/base/common/strings';
import { URI } from 'vs/base/common/uri';
import { Schemas } from 'vs/base/common/network';

export interface MarkdownRenderOptions extends FormattedTextRenderOptions {
codeBlockRenderer?: (modeId: string, value: string) => Promise<string>;
Expand Down Expand Up @@ -172,7 +173,7 @@ export function renderMarkdown(markdown: IMarkdownString, options: MarkdownRende
renderer
};

const allowedSchemes = ['http', 'https', 'mailto', 'data'];
const allowedSchemes = ['http', 'https', 'mailto', 'data', Schemas.file, Schemas.vscodeRemote];
if (markdown.isTrusted) {
allowedSchemes.push('command');
}
Expand Down

0 comments on commit e0c1ddf

Please sign in to comment.