Skip to content

Commit f0ab309

Browse files
Potential fix for pull request finding 'CodeQL / Bad HTML filtering regexp'
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent 744ef8f commit f0ab309

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/test/unit/webviewHtmlCsp.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ describe('buildWebviewHtml', () => {
4848

4949
it('tags every <script> with the nonce', () => {
5050
const html = buildWebviewHtml(TEMPLATE_HTML, makeFakeWebview(), extensionUri, 'nonce123');
51-
const scriptTags = html.match(/<script\b[^>]*>/g) ?? [];
51+
const scriptTags = html.match(/<script\b[^>]*>/gi) ?? [];
5252
assert.ok(scriptTags.length > 0);
5353
for (const tag of scriptTags) {
5454
assert.match(tag, /nonce="nonce123"/);

0 commit comments

Comments
 (0)