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.

site_1no tests exist for highly testable pure logicDone HIGH
task · tests

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.

site_2rawHtml and link/image hrefs reach disk unsanitized (HTML/JS injection)Done HIGH
bug · completeness

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.

site_3heading-id derivation and TOC only scan top-level blocksDone MED
task · completeness

Resolved 2026-06-20. deriveHeadingIds + TOC collection now recurse into nested blocks (notes/quotes/figures); byte-identical on the real core docs.

site_4partial writes leave a half-built site on first error; some failures unreportedDone MED
bug · completeness

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.

site_5render, templating, and file I/O share one translation unitDone LOW
task · separation

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.

site_6cleanDone LOW
task · naming

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: escescapeChrome, hrefhrefFor, plainTextflattenText/collectText, headingscollectHeadings. Low priority.

site_7cleanDone LOW
task · filesize

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.

site_8committed build/ dir present in tree, thin README build sectionDone LOW
task · organization

Resolved 2026-06-20. Removed the stale build/ binary (build/ is gitignored + untracked) and expanded the README (trust boundary, layout, tests; codecs-in-core).