Skip to content

Commit 3d1f720

Browse files
authored
CodeQL suppressions (microsoft#188183)
1 parent 9f6ecfd commit 3d1f720

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/vs/base/common/htmlContent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export class MarkdownString implements IMarkdownString {
6060
this.value += escapeMarkdownSyntaxTokens(this.supportThemeIcons ? escapeIcons(value) : value)
6161
.replace(/([ \t]+)/g, (_match, g1) => ' '.repeat(g1.length))
6262
.replace(/\>/gm, '\\>')
63-
.replace(/\n/g, newlineStyle === MarkdownStringTextNewlineStyle.Break ? '\\\n' : '\n\n');
63+
.replace(/\n/g, newlineStyle === MarkdownStringTextNewlineStyle.Break ? '\\\n' : '\n\n'); // CodeQL [SM02383] The Markdown is fully sanitized after being rendered.
6464

6565
return this;
6666
}

src/vs/workbench/contrib/notebook/browser/view/renderers/webviewPreloads.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2611,7 +2611,7 @@ async function webviewPreloads(ctx: PreloadContext) {
26112611

26122612
this._content = { preferredRendererId, preloadErrors };
26132613
if (content.type === 0 /* RenderOutputType.Html */) {
2614-
const trustedHtml = ttPolicy?.createHTML(content.htmlContent) ?? content.htmlContent;
2614+
const trustedHtml = ttPolicy?.createHTML(content.htmlContent) ?? content.htmlContent; // CodeQL [SM03712] The content comes from renderer extensions, not from direct user input.
26152615
this.element.innerHTML = trustedHtml as string;
26162616
} else if (preloadErrors.some(e => e instanceof Error)) {
26172617
const errors = preloadErrors.filter((e): e is Error => e instanceof Error);

0 commit comments

Comments
 (0)