mirror of
https://github.com/storytold/craft-libs.git
synced 2026-10-31 07:39:23 +00:00
Review findings, all reproduced before this fix: - opens_doctype matched the keyword without requiring <! first, so the valid element <aDOCTYPE> was treated as a declaration: depth-capped documents passed under DeclarationOnly and ordinary elements were refused under Refuse. - A processing instruction inside an internal subset was not skipped, so a ] inside it ended the subset measurement early and the rest of the subset escaped the byte cap. - A UTF-16 document was silently admitted: the scan saw no ASCII markup at all, so a refused DTD passed. A UTF-16 BOM now returns UnsupportedEncoding; the caller decodes to UTF-8 first. Each has a regression test; workspace tests, clippy -D warnings and fmt pass.