# What changed in justhtml

> 27 changes in justhtml 1 to 3 from its official release notes, upgrade guides and advisories: 1 breaking, 12 security, 2 new APIs and options. Each one cited. Sources checked 2026-10-25. HTML: https://unstale.sh/pypi/justhtml/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## justhtml 3

### Breaking changes

- Non-ASCII IPv4 octets are rejected without conversion errors on Unicode digit lookalikes. (3.15.0) — [release notes](https://github.com/EmilStenstrom/justhtml/releases/tag/v3.15.0)

### Security

- Indentation is bounded to prevent quadratic output expansion from deeply nested lists. (3.15.0) — [release notes](https://github.com/EmilStenstrom/justhtml/releases/tag/v3.15.0)
- Scanning remains linear across repeated HTML comment markers, including with default sanitization and the event stream API. (3.15.0) — [release notes](https://github.com/EmilStenstrom/justhtml/releases/tag/v3.15.0)

### New APIs and options

- Per-attribute literal and Regex(...) value allowlists are supported while preserving URL and inline-style validation. (3.15.0) — [release notes](https://github.com/EmilStenstrom/justhtml/releases/tag/v3.15.0)
- CSS properties can have literal-string and Regex(...) value allowlists, including explicit permission for CSS variable references. (3.15.0) — [release notes](https://github.com/EmilStenstrom/justhtml/releases/tag/v3.15.0)

### Performance

- Class and attribute token sets are shared within selector queries, and attribute caches are allocated only when needed. (3.14.0) — [release notes](https://github.com/EmilStenstrom/justhtml/releases/tag/v3.14.0)

### Fixes and other changes

- Whitespace after a <base>, <link> or <meta> that implies the <head> stays in the head, even when sanitization removes the metadata element. (3.15.0) — [release notes](https://github.com/EmilStenstrom/justhtml/releases/tag/v3.15.0)
- CSS declarations, URL lists, encoding labels, and streamed doctypes use ASCII whitespace rules. (3.14.0) — [release notes](https://github.com/EmilStenstrom/justhtml/releases/tag/v3.14.0)
- An open <button> stays nested when an object, applet, marquee, table cell, caption, or integration point separates it from another open <button>. (3.14.0) — [release notes](https://github.com/EmilStenstrom/justhtml/releases/tag/v3.14.0)
- Non-ASCII whitespace is preserved in class and attribute tokens, selector identifiers, HTML cleanup, and pretty output. (3.14.0) — [release notes](https://github.com/EmilStenstrom/justhtml/releases/tag/v3.14.0)
- Malformed :nth-child() and :nth-of-type() formulas are rejected without accepting Unicode digits or Python integer syntax. (3.14.0) — [release notes](https://github.com/EmilStenstrom/justhtml/releases/tag/v3.14.0)
- 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. (3.14.0) — [release notes](https://github.com/EmilStenstrom/justhtml/releases/tag/v3.14.0)
- Definition-list items remain open across intervening special elements such as search. (3.13.1) — [release notes](https://github.com/EmilStenstrom/justhtml/releases/tag/v3.13.1)
- Doctypes are excluded from element selectors, direct matching, and structural sibling indexing. (3.13.1) — [release notes](https://github.com/EmilStenstrom/justhtml/releases/tag/v3.13.1)
- HTML5 frameset eligibility is preserved after ordinary body elements, comments, and raw-text content. (3.13.1) — [release notes](https://github.com/EmilStenstrom/justhtml/releases/tag/v3.13.1)
- Frameset replacement is blocked after literal or character-reference replacement characters in foreign content. (3.13.1) — [release notes](https://github.com/EmilStenstrom/justhtml/releases/tag/v3.13.1)
- Root attribute overrides are honored when deeply cloning nodes, elements, and templates. (3.13.1) — [release notes](https://github.com/EmilStenstrom/justhtml/releases/tag/v3.13.1)

## justhtml 1

### Security

- justhtml: to_markdown() code-span blank-line breakout enables XSS (1.22.0) — [security advisory](https://github.com/advisories/GHSA-JF6W-2MVX-633J)
- justhtml introduces denial-of-service hardening (1.18.0) — [security advisory](https://github.com/advisories/GHSA-R8CJ-3554-33MR)
- justhtml has sanitization bypass in custom policies and programmatic DOM (1.17.0) — [security advisory](https://github.com/advisories/GHSA-VRX2-77F2-WW34)
- Multiple security fixes in justhtml (1.16.0) — [security advisory](https://github.com/advisories/GHSA-4P64-V8F5-R2GX)
- justhtml includes multiple security fixes (1.15.0) — [security advisory](https://github.com/advisories/GHSA-C9VM-HV86-F23R)
- justhtml: Mutation XSS with custom foreign-namespace sanitization policies (1.14.0) — [security advisory](https://github.com/advisories/GHSA-R758-8HXW-4845)
- JustHTML is vulnerable to XSS via code fence breakout in <pre> content (1.13.0) — [security advisory](https://github.com/advisories/GHSA-5VP3-3CG6-2RQ3)
- JustHTML Affected by Mutation XSS via Literal Text Serialization in Raw Text Elements (style/script) (1.12.0) — [security advisory](https://github.com/advisories/GHSA-QVC2-MG72-JJHX)
- JustHTML has a Sanitizer Bypass (in Markdown) (1.12.0) — [security advisory](https://github.com/advisories/GHSA-3RCM-VJRC-P45J)
- Uncontrolled recursion DoS in JustHTML() via deeply nested HTML (1.10.0) — [security advisory](https://github.com/advisories/GHSA-V7CF-C9RM-WM3J)
