# Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] ## [3.17.1] - 2026-11-14 ### Fixed - Keep paragraphs, code blocks, and nested lists inside their Markdown list items, using continuation indentation based on each marker's width (#103). ## [3.17.0] - 2026-11-09 ### Security - Restrict decimal character references to ASCII digits, preventing uncaught conversion errors on Unicode digit lookalikes in text and attributes, including the event stream API. ### Fixed - Decode legacy named character references before non-ASCII characters in attributes, using HTML's ASCII alphanumeric boundary rules. - Preserve Unicode digit lookalikes when escaping Markdown ordered-list markers. ## [3.16.0] - 2026-10-26 ### Added - Allow `True` in `allowed_css_properties` mappings to mix properties using normal sanitizer checks with properties restricted by literal or regex value rules. ### Fixed - Process a leading NUL through document and head recovery before discarding it in the body, including text mixed with character references. Preserve following body whitespace, head-element placement, and text source locations. - Keep whitespace after `` under `` until body content begins, including encoded whitespace and whitespace followed by other text in the same token. ## [3.15.0] - 2026-10-24 ### Added - Allow per-attribute literal and `Regex(...)` value allowlists in `allowed_attributes`, preserving URL and inline-style validation. - Allow per-property CSS value allowlists with literal strings and `Regex(...)` patterns, including explicit permission for CSS variable references. ### Security - Keep script scanning linear across repeated HTML comment markers, including with default sanitization and the event stream API. - Bound Markdown list indentation to prevent quadratic output expansion from deeply nested lists. - Reject non-ASCII IPv4 octets during linkification without raising conversion errors on Unicode digit lookalikes. ### Fixed - Keep whitespace after a ``, `` or `` that implies the `` in the head, including when sanitization removes the metadata element. ## [3.14.0] - 2026-10-22 ### Fixed - Ignore NUL after a less-than sign in HTML text and in CDATA at HTML/MathML integration points, while preserving foreign-text and RAWTEXT replacement rules. - Preserve non-ASCII whitespace in class and attribute tokens, selector identifiers, HTML cleanup, and pretty output. - Apply ASCII whitespace rules to CSS declarations, URL lists, encoding labels, and streamed doctypes. - Reject malformed `:nth-child()` / `:nth-of-type()` formulas without accepting Unicode digits or Python integer syntax. - Keep a `