Skip to content

Commit

Permalink
CodeQL suppressions
Browse files Browse the repository at this point in the history
  • Loading branch information
mjbvz committed Jul 18, 2023
1 parent 87baaea commit 88217c5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/vs/base/common/htmlContent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export class MarkdownString implements IMarkdownString {
this.value += escapeMarkdownSyntaxTokens(this.supportThemeIcons ? escapeIcons(value) : value)
.replace(/([ \t]+)/g, (_match, g1) => ' '.repeat(g1.length))
.replace(/\>/gm, '\\>')
.replace(/\n/g, newlineStyle === MarkdownStringTextNewlineStyle.Break ? '\\\n' : '\n\n');
.replace(/\n/g, newlineStyle === MarkdownStringTextNewlineStyle.Break ? '\\\n' : '\n\n'); // CodeQL [SM02383] The Markdown is fully sanitized after being rendered.

return this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2536,7 +2536,7 @@ async function webviewPreloads(ctx: PreloadContext) {

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

0 comments on commit 88217c5

Please sign in to comment.