pypi / justhtml
justhtml
What changed in justhtml 1 to 3, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-25.
1 breaking12 security2 new APIs and options1 performance11 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initjusthtml 317 changes
Breaking changes 1
Non-ASCII IPv4 octets are rejected without conversion errors on Unicode digit lookalikes.
Security 2
Indentation is bounded to prevent quadratic output expansion from deeply nested lists.
Scanning remains linear across repeated HTML comment markers, including with default sanitization and the event stream API.
New APIs and options 2
Per-attribute literal and Regex(...) value allowlists are supported while preserving URL and inline-style validation.
CSS properties can have literal-string and Regex(...) value allowlists, including explicit permission for CSS variable references.
Performance 1
Class and attribute token sets are shared within selector queries, and attribute caches are allocated only when needed.
Fixes and other changes 11
Whitespace after a <base>, <link> or <meta> that implies the <head> stays in the head, even when sanitization removes the metadata element.
CSS declarations, URL lists, encoding labels, and streamed doctypes use ASCII whitespace rules.
An open <button> stays nested when an object, applet, marquee, table cell, caption, or integration point separates it from another open <button>.
Non-ASCII whitespace is preserved in class and attribute tokens, selector identifiers, HTML cleanup, and pretty output.
Malformed :nth-child() and :nth-of-type() formulas are rejected without accepting Unicode digits or Python integer syntax.
NUL after a less-than sign is ignored in HTML text and CDATA at HTML/MathML integration points, while foreign-text and RAWTEXT replacement rules are preserved.
Definition-list items remain open across intervening special elements such as search.
Doctypes are excluded from element selectors, direct matching, and structural sibling indexing.
HTML5 frameset eligibility is preserved after ordinary body elements, comments, and raw-text content.
Frameset replacement is blocked after literal or character-reference replacement characters in foreign content.
Root attribute overrides are honored when deeply cloning nodes, elements, and templates.
justhtml 110 changes
Security 10
justhtml: to_markdown() code-span blank-line breakout enables XSS
justhtml introduces denial-of-service hardening
justhtml has sanitization bypass in custom policies and programmatic DOM
Multiple security fixes in justhtml
justhtml includes multiple security fixes
justhtml: Mutation XSS with custom foreign-namespace sanitization policies
JustHTML is vulnerable to XSS via code fence breakout in <pre> content
JustHTML Affected by Mutation XSS via Literal Text Serialization in Raw Text Elements (style/script)
JustHTML has a Sanitizer Bypass (in Markdown)
Uncontrolled recursion DoS in JustHTML() via deeply nested HTML