From 6abe506d775f500b71b0fa7bffb3adf51e50d1a2 Mon Sep 17 00:00:00 2001 From: garrytan Date: Mon, 2 Nov 2026 13:30:56 +0000 Subject: [PATCH] test(review-depth): non-ASCII spaces in and non-ASCII name prefixes keep an SVG code (GST-940 fix-check, failing) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> --- test/review-planner-misreads.test.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/review-planner-misreads.test.ts b/test/review-planner-misreads.test.ts index 42059f822..2bbaea298 100644 --- a/test/review-planner-misreads.test.ts +++ b/test/review-planner-misreads.test.ts @@ -126,7 +126,8 @@ describe('GST-911 misread 1: a chart SVG is data, an SVG that can run code is se // fails_when=an external image or stylesheet, an entity declaration, an external DTD, an animation or a CSS url() to another document reads as docs, // including through a CSS escape or a zero-padded character reference (review pass 1 findings) or behind a stray quote that // pairs with a later one (review pass 2 finding), or any CSS beyond declarations and url(#id) (Step 11 finding: image-set()), - // including CSS behind a character-reference or comment, or an HTML-only comment end (GST-940); + // including CSS behind a character-reference or comment, an HTML-only comment end, a quoted > on the style tag, a + // non-ASCII space before > in , or a tag or attribute under a non-ASCII namespace prefix (GST-940); // seam=collectCommit + depthOfCommitInput test.each([ ['an external image', ' '], @@ -161,6 +162,11 @@ describe('GST-911 misread 1: a chart SVG is data, an SVG that can run code is se ['CSS after an HTML --!> comment end in a style element', ' '], ['a inside a quoted style attribute', ' '], ['an escaped ampersand in a style element', ' '], + ['a no-break space before > in ', ' '], + ['a vertical tab before > in ', ' '], + ['a script under a non-ASCII prefix', ' fetch(1)'], + ['a style under a non-ASCII prefix', ' rect{fill:image-set("https://x.test/p.png" 1x)}'], + ['an external href under a non-ASCII prefix', ' '], ])('%s keeps the SVG code', (_name, line) => { const fx = fixture(); expect(plan(fx, fx.commit({ 'results/chart.svg': chart(5, line) })).class).toBe('code');