regex fix for codeql (#190211)

* regex fix

* added suppression comment
This commit is contained in:
Meghan Kulkarni 2023-08-11 10:24:32 -07:00 committed by GitHub
parent 76985ae781
commit 01d8f7d47c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -390,7 +390,7 @@ function escapeMarkdownLinkPath(mdPath: string, isExternalLink: boolean): string
}
function escapeBrackets(value: string): string {
value = value.replace(/[\[\]]/g, '\\$&');
value = value.replace(/[\[\]]/g, '\\$&'); // CodeQL [SM02383] The Markdown is fully sanitized after being rendered.
return value;
}