mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-17 13:44:32 +01:00
fix(review-depth): read the SVG style tag quote by quote (GST-940 red-team#1)
No-loss replay GST-940 rerun: 62,805 unique SVG files keep main's verdict and the planner over 100 main commits changes nothing. Repins lib/review-depth.ts on GST-940. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
8ad07db127
commit
2c8d13960e
4 files changed
+11
-8
No files matched your search
@@ -187,7 +187,7 @@ elements and RDF metadata, CSS made of declarations only (no `@` rule and no
|
||||
function but a same-file `url(#id)`, which closes `@import`, `image-set()`,
|
||||
`image()`, `element()` and every other CSS load), no backslash escape, every
|
||||
`href` a same-file `#` reference or an inline raster image, no event handler and no
|
||||
entity declaration, and no DOCTYPE but a bare `<!DOCTYPE svg>` or W3C's own SVG DTD, read after character references are decoded. A `<style>` element's text is read as written: any `&` in it keeps the SVG code, and its comments are read as CSS, so neither a character-reference `</style>` nor a comment that only an HTML parser ends early can hide CSS (GST-940); anything else, a
|
||||
entity declaration, and no DOCTYPE but a bare `<!DOCTYPE svg>` or W3C's own SVG DTD, read after character references are decoded. A `<style>` element's text is read as written: any `&` in it keeps the SVG code, its comments are read as CSS, and an attribute value on its opening tag that holds `<` or `>` keeps the SVG code, so no character-reference `</style>`, comment that only an HTML parser ends early, or quoted `>` can hide CSS (GST-940); anything else, a
|
||||
script or `foreignObject` included, keeps it code. More than
|
||||
2,000 data paths keep every one code; a `git grep` failure is `consumer_scan_failed`
|
||||
and fails the depth closed. Only `classifyDiff` applies the rule (`lib/review-collect.ts`
|
||||
|
||||
Reference in new issue
Block a user