mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-03 04:38:33 +00:00
test(bundler): case-insensitive script regex in ASI-guard test
CodeQL flagged the inline `<script>...</script>` regex as case-sensitive, which would miss `<SCRIPT>` tags. The bundler always emits lowercase, so this is a defense-in-depth fix matching the `/i` flag already used by the sibling regexes in this file (lines 37 & 75). Addresses CodeQL review on #641.
This commit is contained in:
@@ -107,7 +107,7 @@ describe("bundleToSingleHtml", () => {
|
||||
// the separator, parse would fail with an unexpected-token error somewhere
|
||||
// around the chunk boundary.
|
||||
const { transformSync } = await import("esbuild");
|
||||
const re = /<script\b[^>]*>([\s\S]*?)<\/script>/g;
|
||||
const re = /<script\b[^>]*>([\s\S]*?)<\/script>/gi;
|
||||
let m: RegExpExecArray | null;
|
||||
while ((m = re.exec(bundled)) !== null) {
|
||||
const body = m[1];
|
||||
|
||||
Reference in New Issue
Block a user