From 042d5aaba6d10c1f0497db9c86f6f71f9e69368c Mon Sep 17 00:00:00 2001 From: Vance Ingalls Date: Thu, 30 Jul 2026 00:13:42 -0700 Subject: [PATCH] fix(producer): strip script bodies to a fixed point, not one pass MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CodeQL (incomplete multi-character sanitization, code-scanning/803) on the script-stripping regex added in c61a24b51 — a failing check, and correct: a single replace can reform the pattern it just removed, since `ipt>` leaves a whole `", + // which pass 2 removes. A single pass would leave a stray tag behind. + expect(countElementTags("
ipt>alert(1)")).toBe(1); + }); + + it("terminates on input with no closing tag rather than looping", () => { + expect(countElementTags("