site
software/site · 0 open · 8 done
Tight renderer, now safe and tested. HTML/JS injection is closed (URL-scheme + rawHtml sanitised, obfuscation-resistant), the build is atomic (two-phase, no half-built site), heading IDs/TOC recurse into nested blocks, and there is a real test target (26 cases / 86 checks). The optional deeper file-split is left as a noted nicety.
Resolved 2026-06-20. Added a test target (test.sh + tests/) with 26 cases / 86 checks over slugify, groupCodeTabs, escaping, href, the sanitizer, heading-id/TOC derivation, renderPage chrome, and end-to-end buildSite incl. an XSS scrub.
Resolved 2026-06-20. Added a recursive sanitizeDocument pass: blanks script-bearing link/image URLs (javascript:/vbscript:/data:) with scheme canonicalization that defeats entity/whitespace/NUL obfuscation, and gates rawHtml islands to svg/math only.
Resolved 2026-06-20. deriveHeadingIds + TOC collection now recurse into nested blocks (notes/quotes/figures); byte-identical on the real core docs.
Resolved 2026-06-20. buildSite is now two-phase: render every page in memory before writing, so a bad doc leaves nothing written; missing css/assets warn instead of being swallowed.
Resolved 2026-06-20. Extracted the chrome into a pure, unit-tested renderPage and split the testable surface into SiteInternal.h. The deeper Render/Io TU split (marked Optional in the finding) was intentionally left out as low-value/higher-risk for the no-cmake build.
Where: Site.cpp.
Problem: None blocking. Functions read as verbs or are acceptable: readFile, writeFile, buildSite, slugify, deriveHeadingIds, groupCodeTabs. esc (Site.cpp:42), href (Site.cpp:50), plainText (Site.cpp:53), and headings (Site.cpp:85) are noun/abbreviation-named functions that return a value rather than reading as verbs, a minor nit. (Page/Head are types, exempt.)
Fix: If touched, rename to verbs: esc→escapeChrome, href→hrefFor, plainText→flattenText/collectText, headings→collectHeadings. Low priority.
Where: all sources.
Problem: No file exceeds the thresholds. src/Site.cpp 249, src/Site.h 19, src/main.cpp 17 lines. Nothing over 800, nothing over 1000.
Fix: None.
Resolved 2026-06-20. Removed the stale build/ binary (build/ is gitignored + untracked) and expanded the README (trust boundary, layout, tests; codecs-in-core).