NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI
PyPI
A fast, fully typed HTML toolkit for Python, powered by a C-accelerated core.
Latest stable
1.15.11
Last release 9 days ago
16 Nov 2026
Ships fairly regularly
a new release about every 2 weeks
Nearly every release is documented
notes for 37 of 37 stable releases
Nothing withdrawn
no release was ever pulled
5 months old
37 releases · first in 2026
Drag across the ruler to compare, or tap a release to open it.
Prevent phone-number extensions with many separators from writing past the recognizer's chunk buffer. Preserve XML comment boundaries after invalid co
XPathDepthError during parsing, matching evaluation (#1675) by @gaborbernat.Element.insert() and ElementView.insert() no longer slow down with the number of siblings when inserting near either end of a long child list (#2150) by @gaborbernat. (#1695)rewrite writes the markup that follows, and a < the edit left before it, so a browser reads them as it read the input (#2146) by @gaborbernat. (#1701)xs:simpleType, as it already does for a type= declaration (#2127) by @gaborbernat. (#1708)computed_style fast on deeply nested documents in any call order, instead of restyling every ancestor on each call (#2181) by @gaborbernat. (#1718)<meta http-equiv=refresh> targets as browsers do, so links(), rewrite_links(), resolve_links() and meta_refresh() agree, and text right after the delay is no redirect (#2126) by @gaborbernat. (#1737)Range calls over the children of one wide element no longer slows down with the square of the child count (#2144) by @gaborbernat. (#1743)minify_css no longer brings to life an @import, @namespace, @charset or @layer statement that browsers ignore, and keeps an empty rule that holds one back (#2145) by @gaborbernat. (#1745)ValueError instead of running past it (#2131) by @gaborbernat. (#1746)matches(), replace() or extension functions no longer slow down with each level of nesting (#2179) by @gaborbernat. (#1748)< and text, including raw text past the nesting cap (#2195) by @gaborbernat. (#1752)to_source, so the output reparses in the source's document mode (#2141) by @gaborbernat. (#1757)rewrite() no longer lets a removed <script> through on pages nested past 8,192 open elements; edits it cannot apply there raise ValueError (#2196) by @gaborbernat. (#1758)srcset candidates like a browser: commas inside parentheses no longer split a candidate, and candidates with invalid descriptors are skipped (#2148) by @gaborbernat. (#1759)Text.data, Comment.data or the etree text and tail properties now keeps memory proportional to the current text instead of every value assigned (#2133) by @gaborbernat. (#1760)style attribute now drops the rest of a declaration broken by a {} block or a stray }, rather than letting it apply (#2151) by @gaborbernat. (#1763)xs:list and xs:union values are now checked against their item or member types, including xs:NMTOKENS, xs:IDREFS and xs:ENTITIES, instead of accepting any text (#2147) by @gaborbernat. (#1765)<style> bodies no longer keep properties outside css_properties that browsers apply, and drop declarations containing a unicode-range token (#2137) by @gaborbernat. (#1768)<style> elements alone no longer make computed_style recompile every sheet, and changes to a style's type or text apply at once (#2166) by @gaborbernat. (#1770)<meta> charset values are read in full, so padded labels resolve, and a charset that names no encoding no longer hides a content declaration, as in browsers (#2155) by @gaborbernat. (#1775)minify output now reads the same in browsers that run scripts: <noscript> content is copied from the source, and a page whose <noscript> content parses differently there keeps everything after it unminified (#2154) by @gaborbernat. (#1776)minify_css keeps a hash color that contains a CSS escape as written instead of shortening it, so the escape no longer swallows the closing brace of its rule (#2191) by @gaborbernat. (#1849)minify_css keeps a rule whose selector starts with a combinator, such as > or ~, rather than dropping it or merging it into the rule before (#2192) by @gaborbernat. (#1850)calc()-unwrapped value to the token after it, and a calc() group left open at end of input folds in one pass (#2197) by @gaborbernat. (#1852)calc() (#2194) by @gaborbernat. (#1853)selectedcontent placed after its option (#1861) by @gaborbernat. (#1859) in text and attribute values, so sanitized and minified output stays unchanged when parsed and serialized again (#1866) by @gaborbernat. (#1864)xs:all now accept their children in any order, and an xs:all nested in a sequence or choice fails to compile (#2028) by @gaborbernat. (#2015)canonicalize on HTML-parsed trees now renders the xmlns: declarations that prefixed names use, so the output reparses in the same namespaces; a relative namespace URI raises ValueError (#2040) by @gaborbernat. (#2025)xs:all group, through a group reference or an xs:all element with maxOccurs above 1, now fails to compile (#2031) by @gaborbernat. (#2029)xs:all content model with particles now fails to compile, and an extension without particles validates the base's members in any order (#2042) by @gaborbernat. (#2032)minOccurs or maxOccurs on an xs:all, xs:sequence, or xs:choice inside an xs:group now fail to compile instead of ignoring the occurrence (#2071) by @gaborbernat. (#2060)canonicalize() now keep each element in its namespace when the parent element is left out because its name is not a valid XML name (#2063) by @gaborbernat. (#2062)interleave of optional children now takes time linear in the number of children, and some such schemas no longer raise as too ambiguous (#2076) by @gaborbernat. (#2064)RelaxNG schema no longer writes into its compiled patterns, which raced with concurrent validations on free-threaded builds (#2118) by @gaborbernat. (#2108)xsl:number level="multiple" now prints a number for every counted ancestor of a deeply nested element, where it used to drop the outermost ones (#2134) by @gaborbernat. (#2120)css_path no longer hangs on a detached parse_fragment root that has an id (#2140) by @gaborbernat. (#2124)XMLSchema validation now rejects attributes on elements with a simple type, except namespace declarations and the xsi: attributes the XSD spec allows (#2138) by @gaborbernat. (#2128)Element from many attributes, and sanitizing with a policy that forces many attributes on one tag, no longer slows down quadratically (#2143) by @gaborbernat. (#2142)minify_css no longer starts its output with an @charset rule unless the input did, so browsers decode the output as they decode the input (#2160) by @gaborbernat. (#2149)xsl:copy and xsl:copy-of now keep the namespace declarations in scope at the copied element, so prefixed names stay bound in the output (#2170) by @gaborbernat. (#2152)minify_css() and minify_css_inline() keep every /*! ... */ bang comment, including those inside rules or declarations they drop (#2163) by @gaborbernat. (#2157)MemoryError instead of returning wrong Markdown or corrupting memory during canonicalization (#2168) by @gaborbernat. (#2158)XMLSchema and RelaxNG validation now rejects text outside the lexical forms of the ID, IDREF, ENTITY, NOTATION and g* date built-in types instead of accepting any value (#2185) by @gaborbernat. (#2159)minify_css treats a leading byte-order mark as the encoding signature, so the first rule after it is no longer dropped (#2172) by @gaborbernat. (#2162)exclude-result-prefixes lists those prefixes (#2188) by @gaborbernat. (#2165)xsl:element now creates its element in the namespace of its namespace attribute and declares that namespace in the output, so the result parses as XML (#2186) by @gaborbernat. (#2169)MemoryError, not ValueError (#2177) by @gaborbernat. (#2171)RecursionError for deeply nested schemas instead of crashing the interpreter (#2189) by @gaborbernat. (#2187):has() argument on a very deep tree no longer use memory that grows with selector length times depth (#2203) by @gaborbernat. (#2201)minify_css_inline() no longer repeats a bang comment that sits inside an unclosed or invalid CSS function on each pass (#2207) by @gaborbernat. (#2204)namespaces= matches them (#2215) by @gaborbernat. (#2211)select, test and attribute value template expressions now resolve a prefix declared on the stylesheet root or on the instruction itself, instead of raising an undefined prefix error (#2217) by @gaborbernat. (#2213)computed_style() now returns the right color for an element when several rules in a stylesheet use :nth-child() or :nth-last-child() with an of selector list (#2221) by @gaborbernat. (#2220)XMLSchema and RelaxNG now resolve non-ASCII namespace prefixes and match non-ASCII attribute names to the declarations they name (#2088) by @gaborbernat.rewrite and Minify output no longer make a valueless attribute take the next attribute's name as its value when that name starts with = (#1965) by @gaborbernat.tokenize, Tokenizer and HTMLParser now tokenize <title>, <style>, <script> and CDATA inside <svg> and <math> as browsers do (#1988) by @gaborbernat.form_data now collects the controls inside SVG and MathML elements named datalist, template or fieldset, and such elements no longer disable them (#2083) by @gaborbernat.find and find_all no longer crash when a regex or callable filter edits the tree during the search; the search carries on from the element it reached (#2053) by @gaborbernat.to_source now escapes < and & in text it copies from the source, so that text can no longer come back as markup (#2123) by @gaborbernat.to_source now writes the end tag of an element the source left open, unless HTML makes that tag optional there (#2115) by @gaborbernat.to_markdown (#2072) by @gaborbernat.RecursionError instead of crashing, and a very deep one may fail where it used to finish (#1891) by @gaborbernat.ValueError (#2026) by @gaborbernat.SystemError (#2199) by @gaborbernat.charset, http-equiv, content or shadowroot*, so they no longer set the encoding or attach a shadow root (#2011) by @gaborbernat.generate-id() values from node creation order, so transform output no longer contains heap addresses (#1887) by @gaborbernat.url() and @import targets are now read and written back the way browsers read them, so rewritten links no longer change where a stylesheet ends (#1977) by @gaborbernat.to_markdown() call now takes linear time instead of quadratic time (#2119) by @gaborbernat.ValueError instead of crashing the interpreter when run on a thread with a small stack (#1892) by @gaborbernat.rewrite keep long attribute names whole, and by-name handler calls on tags with many attributes now run in linear time (#1993) by @gaborbernat.iter_elements no longer takes quadratic time, and an element moved back under the iterated node is bounded by it again (#2099) by @gaborbernat.MutationObserver objects no longer slows down with the number of watched nodes (#1966) by @gaborbernat.minInclusive, maxInclusive, minExclusive and maxExclusive on xs:date, xs:dateTime, xs:time and xs:duration in XMLSchema and RelaxNG; values outside the bounds were accepted (#1888) by @gaborbernat.external_only=True links, and no longer read past the end of such a host (#1985) by @gaborbernat.external_only=True links, and hosts with an empty label before their domain stay separate (#2000) by @gaborbernat.scale() and translate() arguments whole during CSS minification when a string, comment or block in them holds a comma, so the rest of the stylesheet keeps its meaning (#1874) by @gaborbernat.minify_css no longer drops the declaration (#1990) by @gaborbernat.url() when minifying, so its backslash cannot escape the closing ) (#1958) by @gaborbernat.<frame> after a <frameset> refused at the nesting limit, instead of dropping some of them (#1878) by @gaborbernat.<style> bodies (#1972) by @gaborbernat.turbohtml.etree element by position is no longer quadratic in their count (#1959) by @gaborbernat.white-space: pre element that would start a line as a span, not pre, and escapes list and heading markers after <sub> and <sup> (#2121) by @gaborbernat.<q> quote marks on code fence lines. A quote starting with a block now puts its marks on their own lines (#2081) by @gaborbernat.url() where a browser does, so a comment or quote inside one can no longer keep or drop declarations it should not (#2098) by @gaborbernat.u+ and hex digits whole, with its arguments in the same value (#2102) by @gaborbernat.url() holds a quote, and keeps attr() and if() values with a backslash before a newline (#1999) by @gaborbernat.var() or env() (#1980) by @gaborbernat.Note truncated.
Your coding agent can read these notes before it upgrades. Set up the MCP server →
One column per month.
Prevent phone-number extensions with many separators from writing past the recognizer's chunk buffer. Preserve XML comment boundaries after invalid controls are removed and exact carriage returns and line feeds in CLI text files. Deeply nested XPath expressions now raise XPathDepthError during parsing, matching evaluation (1675) by gaborbernat.
Element.insert() and ElementView.insert() no longer slow down with the number of siblings when inserting near either end of a long child list (2150) by gaborbernat. (1695)
After a handler edit, ~turbohtml.rewrite.rewrite writes the markup that follows, and a < the edit left before it, so a browser reads them as it read the input (2146) by gaborbernat. (1701)
XML Schema validation now rejects child elements in an element declared with an inline xs:simpleType, as it already does for a type= declaration (2127) by gaborbernat. (1708)
Reading or clearing every attribute of an element with many attributes, or removing them by name from either end, now takes time linear in the attribute count (2174) by gaborbernat. (1709)
Multi-step XSD extensions now require every base type's content, so complete documents are accepted and incomplete ones rejected; invalid xs:all extensions now raise (2135) by gaborbernat. (1716)
Keep ~turbohtml.cssom.computed_style fast on deeply nested documents in any call order, instead of restyling every ancestor on each call (2181) by gaborbernat. (1718)
Sanitizer checks now judge each value as the XML serializer writes it too, so dropped control characters can no longer rejoin CSS, URLs, or template markers the checks refused (2116) by gaborbernat. (1728)
Minified CSS keeps the separator after a name ending in an escaped character, so the output parses as the input did (2161) by gaborbernat. (1729)
Read <meta http-equiv=refresh> targets as browsers do, so links(), rewrite_links(), resolve_links() and meta_refresh() agree, and text right after the delay is no redirect (2126) by gaborbernat. (1737)
A loop of ~turbohtml.Range calls over the children of one wide element no longer slows down with the square of the child count (2144) by gaborbernat. (1743)
turbohtml.clean.minify_css no longer brings to life an @import, @namespace, @charset or @layer statement that browsers ignore, and keeps an empty rule that holds one back (2145) by gaborbernat. (1745)
XPath regex searches with back-references now count every capture group against the step limit, so such patterns raise ValueError instead of running past it (2131) by gaborbernat. (1746)
XPath expressions that nest predicates or operators around matches(), replace() or extension functions no longer slow down with each level of nesting (2179) by gaborbernat. (1748)
rewrite() no longer adds a tag where an empty end tag or removed node sat between a < and text, including raw text past the nesting cap (2195) by gaborbernat. (1752)
Keep the doctype's public and system identifiers and forced quirks mode in ~turbohtml.Node.to_source, so the output reparses in the source's document mode (2141) by gaborbernat. (1757)
rewrite() no longer lets a removed <script> through on pages nested past 8,192 open elements; edits it cannot apply there raise ValueError (2196) by gaborbernat. (1758)
Link extraction, rewriting and sanitizing now read srcset candidates like a browser: commas inside parentheses no longer split a candidate, and candidates with invalid descriptors are skipped (2148) by gaborbernat. (1759)
Repeatedly assigning Text.data, Comment.data or the etree text and tail properties now keeps memory proportional to the current text instead of every value assigned (2133) by gaborbernat. (1760)
Minifying a style attribute now drops the rest of a declaration broken by a {} block or a stray }, rather than letting it apply (2151) by gaborbernat. (1763)
XML Schema and RELAX NG range facets now judge the whole of a long numeric value instead of a truncated prefix of it (2164) by gaborbernat. (1764)
xs:list and xs:union values are now checked against their item or member types, including xs:NMTOKENS, xs:IDREFS and xs:ENTITIES, instead of accepting any text (2147) by gaborbernat. (1765)
Style attributes and <style> bodies no longer keep properties outside css_properties that browsers apply, and drop declarations containing a unicode-range token (2137) by gaborbernat. (1768)
Edits that leave <style> elements alone no longer make ~turbohtml.cssom.computed_style recompile every sheet, and changes to a style's type or text apply at once (2166) by gaborbernat. (1770)
A code block whose language contains a backtick is now fenced without that language, so its text stays code instead of being read as Markdown (2153) by gaborbernat. (1771)
Serialized and minified HTML no longer lets a script run past its end tag and turn later content into live markup (2173) by gaborbernat. (1773)
Long <meta> charset values are read in full, so padded labels resolve, and a charset that names no encoding no longer hides a content declaration, as in browsers (2155) by gaborbernat. (1775)
minify output now reads the same in browsers that run scripts: <noscript> content is copied from the source, and a page whose <noscript> content parses differently there keeps everything after it unminified (2154) by gaborbernat. (1776)
XPath function calls with many arguments now run in linear time when the expression uses regex or extension functions (2156) by gaborbernat. (1778)
minify_css keeps the separators that a unicode-range start, an unclosed calc() or a universal selector needs, and stops crashing on some bang comments (2198) by gaborbernat. (1835)
minify_css keeps a hash color that contains a CSS escape as written instead of shortening it, so the escape no longer swallows the closing brace of its rule (2191) by gaborbernat. (1849)
minify_css keeps a rule whose selector starts with a combinator, such as > or ~, rather than dropping it or merging it into the rule before (2192) by gaborbernat. (1850)
CSS minification now keeps a selector with three or more colons as written, and minifying the output again changes nothing (2200) by gaborbernat. (1851)
Minified CSS no longer glues a calc()-unwrapped value to the token after it, and a calc() group left open at end of input folds in one pass (2197) by gaborbernat. (1852)
Minifying CSS with stray brackets, hex escapes or CDO/CDC tokens now gives the same output on a second pass, drops declarations whose name holds a bracket, and folds an unclosed nested calc() (2194) by gaborbernat. (1853)
Sanitized markup now re-parses to the same tree when an option or optgroup would otherwise nest inside an option (1856) by gaborbernat. (1854)
Reparsing serialized output no longer changes a selectedcontent placed after its option (1861) by gaborbernat. (1859)
Sanitized output no longer writes implied tbody, tr, or colgroup tags a policy omits; REMOVE now keeps cells under them (1862) by gaborbernat. (1860)
Content after a table element or template refused at the nesting limit is kept, and a refused template's end tag closes only that template (1865) by gaborbernat. (1863)
Serialization writes carriage returns as in text and attribute values, so sanitized and minified output stays unchanged when parsed and serialized again (1866) by gaborbernat. (1864)
Named groups holding an xs:all now accept their children in any order, and an xs:all nested in a sequence or choice fails to compile (2028) by gaborbernat. (2015)
XSD validation now accepts valid content for repeated particles with minOccurs of two or more whose repetitions can match no children (2075) by gaborbernat. (2017)
Canonical XML and XML serialization now drop characters XML 1.0 forbids from CDATA sections, text and attribute values, so the output parses (2039) by gaborbernat. (2024)
turbohtml.Node.canonicalize on HTML-parsed trees now renders the xmlns: declarations that prefixed names use, so the output reparses in the same namespaces; a relative namespace URI raises ValueError (2040) by gaborbernat. (2025)
A schema that repeats an xs:all group, through a group reference or an xs:all element with maxOccurs above 1, now fails to compile (2031) by gaborbernat. (2029)
A schema that extends an xs:all content model with particles now fails to compile, and an extension without particles validates the base's members in any order (2042) by gaborbernat. (2032)
Schemas that set minOccurs or maxOccurs on an xs:all, xs:sequence, or xs:choice inside an xs:group now fail to compile instead of ignoring the occurrence (2071) by gaborbernat. (2060)
XML output and canonicalize() now keep each element in its namespace when the parent element is left out because its name is not a valid XML name (2063) by gaborbernat. (2062)
RELAX NG validation of a repeated interleave of optional children now takes time linear in the number of children, and some such schemas no longer raise as too ambiguous (2076) by gaborbernat. (2064)
Validating with a shared RelaxNG schema no longer writes into its compiled patterns, which raced with concurrent validations on free-threaded builds (2118) by gaborbernat. (2108)
xsl:number level="multiple" now prints a number for every counted ancestor of a deeply nested element, where it used to drop the outermost ones (2134) by gaborbernat. (2120)
XSLT copies and created elements in no namespace now stay in no namespace when the output is parsed again under a default namespace, as in libxslt (2136) by gaborbernat. (2122)
~turbohtml.Element.css_path no longer hangs on a detached turbohtml.parse_fragment root that has an id (2140) by gaborbernat. (2124)
XMLSchema validation now rejects attributes on elements with a simple type, except namespace declarations and the xsi: attributes the XSD spec allows (2138) by gaborbernat. (2128)
Building an Element from many attributes, and sanitizing with a policy that forces many attributes on one tag, no longer slows down quadratically (2143) by gaborbernat. (2142)
minify_css no longer starts its output with an @charset rule unless the input did, so browsers decode the output as they decode the input (2160) by gaborbernat. (2149)
XSLT xsl:copy and xsl:copy-of now keep the namespace declarations in scope at the copied element, so prefixed names stay bound in the output (2170) by gaborbernat. (2152)
minify_css() and minify_css_inline() keep every /*! ... */ bang comment, including those inside rules or declarations they drop (2163) by gaborbernat. (2157)
Serializing after an allocation failure now raises MemoryError instead of returning wrong Markdown or corrupting memory during canonicalization (2168) by gaborbernat. (2158)
XMLSchema and RelaxNG validation now rejects text outside the lexical forms of the ID, IDREF, ENTITY, NOTATION and g* date built-in types instead of accepting any value (2185) by gaborbernat. (2159)
minify_css treats a leading byte-order mark as the encoding signature, so the first rule after it is no longer dropped (2172) by gaborbernat. (2162)
Literal result elements keep the namespace declarations their own names and attributes need, even when exclude-result-prefixes lists those prefixes (2188) by gaborbernat. (2165)
XPath results that combine nodes from detached subtrees and the document now come back in the same order on every platform, with each tree's nodes kept together (2176) by gaborbernat. (2167)
xsl:element now creates its element in the namespace of its namespace attribute and declares that namespace in the output, so the result parses as XML (2186) by gaborbernat. (2169)
Running out of memory while compiling or validating an XML Schema or RELAX NG schema now always raises MemoryError, not ValueError (2177) by gaborbernat. (2171)
Minifying a document again no longer changes the output: end tags and the body start tag stay where the reparse needs them (2184) by gaborbernat. (2182)
Schema validation and compilation on a worker thread with a small C stack now raise RecursionError for deeply nested schemas instead of crashing the interpreter (2189) by gaborbernat. (2187)
Selector queries with a long :has() argument on a very deep tree no longer use memory that grows with selector length times depth (2203) by gaborbernat. (2201)
minify_css_inline() no longer repeats a bang comment that sits inside an unclosed or invalid CSS function on each pass (2207) by gaborbernat. (2204)
XPath name tests over XML documents now follow XPath 1.0: an unprefixed name skips default-namespace elements, and a prefix bound in namespaces= matches them (2215) by gaborbernat. (2211)
XSLT select, test and attribute value template expressions now resolve a prefix declared on the stylesheet root or on the instruction itself, instead of raising an undefined prefix error (2217) by gaborbernat. (2213)
computed_style() now returns the right color for an element when several rules in a stylesheet use :nth-child() or :nth-last-child() with an of selector list (2221) by gaborbernat. (2220)
~turbohtml.validate.XMLSchema and ~turbohtml.validate.RelaxNG now resolve non-ASCII namespace prefixes and match non-ASCII attribute names to the declarations they name (2088) by gaborbernat.
~turbohtml.rewrite.rewrite and ~turbohtml.Minify output no longer make a valueless attribute take the next attribute's name as its value when that name starts with = (1965) by gaborbernat.
~turbohtml.tokenize, ~turbohtml.Tokenizer and ~turbohtml.migration.stdlib.HTMLParser now tokenize <title>, <style>, <script> and CDATA inside <svg> and <math> as browsers do (1988) by gaborbernat.
~turbohtml.Element.form_data now collects the controls inside SVG and MathML elements named datalist, template or fieldset, and such elements no longer disable them (2083) by gaborbernat.
~turbohtml.Node.find and ~turbohtml.Node.find_all no longer crash when a regex or callable filter edits the tree during the search; the search carries on from the element it reached (2053) by gaborbernat.
~turbohtml.Node.to_source now escapes < and & in text it copies from the source, so that text can no longer come back as markup (2123) by gaborbernat.
~turbohtml.Node.to_source now writes the end tag of an element the source left open, unless HTML makes that tag optional there (2115) by gaborbernat.
A link nested in another link's text is written as its text only, so the outer link keeps its destination and title in ~turbohtml.Node.to_markdown (2072) by gaborbernat.
A recursive XSLT stylesheet on a small-stack thread now raises RecursionError instead of crashing, and a very deep one may fail where it used to finish (1891) by gaborbernat.
A stylesheet or RELAX NG schema that reads more than 1,024 referenced files or 8 MiB through them now raises ValueError (2026) by gaborbernat.
An XPath predicate that fails while a walk covers several nodes now raises its own error, not a SystemError (2199) by gaborbernat.
An element with simple content is now checked against the facets of its base type and of its own restriction (1996) by gaborbernat.
Attributes with non-ASCII names are no longer read as charset, http-equiv, content or shadowroot*, so they no longer set the encoding or attach a shadow root (2011) by gaborbernat.
Build XSLT generate-id() values from node creation order, so transform output no longer contains heap addresses (1887) by gaborbernat.
CSS url() and @import targets are now read and written back the way browsers read them, so rewritten links no longer change where a stylesheet ends (1977) by gaborbernat.
Converting each item of a long list with its own to_markdown() call now takes linear time instead of quadratic time (2119) by gaborbernat.
Deeply nested XPath expressions now raise ValueError instead of crashing the interpreter when run on a thread with a small stack (1892) by gaborbernat.
Edited start tags in ~turbohtml.rewrite.rewrite keep long attribute names whole, and by-name handler calls on tags with many attributes now run in linear time (1993) by gaborbernat.
Editing a deeply nested tree during ~turbohtml.Node.iter_elements no longer takes quadratic time, and an element moved back under the iterated node is bounded by it again (2099) by gaborbernat.
Editing nodes watched by many separate ~turbohtml.MutationObserver objects no longer slows down with the number of watched nodes (1966) by gaborbernat.
Enforce minInclusive, maxInclusive, minExclusive and maxExclusive on xs:date, xs:dateTime, xs:time and xs:duration in ~turbohtml.validate.XMLSchema and ~turbohtml.validate.RelaxNG; values outside the bounds were accepted (1888) by gaborbernat.
Feed extraction reports out-of-memory failures while resolving RDF item references instead of continuing past them (1970) by gaborbernat.
Fix a crash when a callback moved the walked node into another tree; xpath now raises ValueError if its variables move the context node (1927) by gaborbernat.
Fix same-scheme base URLs and meta refresh targets ending in a colon resolving to the page URL instead of the URL they name (2022) by gaborbernat.
Hosts ending in a dot now group with their sibling hosts for external_only=True links, and no longer read past the end of such a host (1985) by gaborbernat.
Hosts ending in several dots now group with their sibling hosts for external_only=True links, and hosts with an empty label before their domain stay separate (2000) by gaborbernat.
Indented Markdown code blocks are fenced wherever a reader would read them as paragraph text, and a list's first item after text gets a blank line before it (2023) by gaborbernat.
Keep scale() and translate() arguments whole during CSS minification when a string, comment or block in them holds a comma, so the rest of the stylesheet keeps its meaning (1874) by gaborbernat.
Keep a CSS string whole when a newline follows a hex escape inside it, so ~turbohtml.clean.minify_css no longer drops the declaration (1990) by gaborbernat.
Keep an escaped whitespace that ends a CSS url() when minifying, so its backslash cannot escape the closing ) (1958) by gaborbernat.
Keep content after a raw-text element such as textarea or noframes in the right place when it is nested past the depth limit (1902) by gaborbernat.
Keep every <frame> after a <frameset> refused at the nesting limit, instead of dropping some of them (1878) by gaborbernat.
Keep paragraphs inside deeply nested list items when converting HTML to Markdown (1677) by gaborbernat.
Keep the sanitizer from trimming whitespace that ends an unterminated string or follows a backslash, which let unlisted CSS properties survive in <style> bodies (1972) by gaborbernat.
Linking a node that is an anchor, or sits inside one, no longer adds links within that anchor. Text under an anchor is left as written (1909) by gaborbernat.
Links with extra slashes before their host now resolve to that host instead of the page's own host, even when tabs or newlines hide the slashes (1880) by gaborbernat.
Looping over the children of a long turbohtml.etree element by position is no longer quadratic in their count (1959) by gaborbernat.
Markdown export writes a white-space: pre element that would start a line as a span, not pre, and escapes list and heading markers after <sub> and <sup> (2121) by gaborbernat.
Markdown output no longer puts <q> quote marks on code fence lines. A quote starting with a block now puts its marks on their own lines (2081) by gaborbernat.
Minifying CSS ends a url() where a browser does, so a comment or quote inside one can no longer keep or drop declarations it should not (2098) by gaborbernat.
Minifying CSS keeps a name that follows u+ and hex digits whole, with its arguments in the same value (2102) by gaborbernat.
Minifying CSS keeps a sheet's meaning when an unquoted url() holds a quote, and keeps attr() and if() values with a backslash before a newline (1999) by gaborbernat.
Minifying CSS now reads a backslash before a newline as browsers do, dropping declarations that hold one unless they are custom properties or use var() or env() (1980) by gaborbernat.
Minifying JavaScript, running an XSLT transform, or evaluating an XPath expression that nests deeper than a small thread stack holds now raises an error instead of crashing the process (2125) by gaborbernat.
Minifying keeps the end tags that a reparse needs in ruby, select, list and definition markup, so some output keeps a few more tags (2030) by gaborbernat.
Minifying the output of ~turbohtml.clean.minify_css or ~turbohtml.clean.minify_css_inline again no longer changes stylesheets whose identifiers or at-keywords end in a hex escape (1836) by gaborbernat.
Moving an element from a ~turbohtml.parse_xml tree into an HTML tree no longer takes time quadratic in the number of attributes on that element (2112) by gaborbernat.
Name the referenced path, not the target its symlinks resolve to, when an import or include escapes its root (1992) by gaborbernat.
Ordered lists in Markdown output now cap item numbers at 999,999,999, so a start or value above that no longer turns an item into a paragraph (1871) by gaborbernat.
Preserve CSS escape terminators, head content after repeated HTML tags, and spaces in Markdown table link destinations (1665) by gaborbernat.
RELAX NG and XSD validation now takes time linear in the document size, however its elements are arranged (2041) by gaborbernat.
Raise ValueError from ~turbohtml.rewrite.rewrite when text written into an unclosed raw-text element would end it early, and escape text written past the nesting cap (2097) by gaborbernat.
Range comparison methods raise ValueError instead of crashing or returning a result when an edit leaves the boundaries in separate trees (1932) by gaborbernat.
Range edits that wrap, cut or insert inside one long text node no longer keep a copy of the remaining text for each edit (2105) by gaborbernat.
Reading tables with rows(), records() or tables() now raises MemoryError when memory runs out, instead of SystemError (1963) by gaborbernat.
Reject NaN in XSD validation when minInclusive, maxInclusive, minExclusive or maxExclusive bounds an xs:double or xs:float, as RELAX NG validation already does (1968) by gaborbernat.
Removing nodes while a ~turbohtml.NodeIterator is live no longer slows with how deeply its root or reference sits in the document (2100) by gaborbernat.
Resolve itemref against the document microdata() is called on, so a copied document no longer crashes it (1989) by gaborbernat.
SVG element names containing non-ASCII characters keep the spelling they were written with, instead of being renamed to a standard SVG name (1954) by gaborbernat.
Selector queries with :has() on trees nested many levels deep no longer slow down depending on where the tree sits in memory (2014) by gaborbernat.
Sets and dicts of elements built from freshly created and appended nodes no longer take quadratic time, since their hashes no longer collide (1956) by gaborbernat.
Stop iter_elements from crashing when linkify_node unwraps or replaces a link the walk is about to visit (1994) by gaborbernat.
Stop indenting a list nested directly in a list before its first item, so Markdown code fences stay fences and plain text loses the stray indent (1991) by gaborbernat.
Stop the sanitizer keeping a <style> inside a <textarea>, <svg> or <math>, and drop comments inside a <textarea>, where a reparse turns them into markup (1875) by gaborbernat.
Stylesheets that define one xsl:attribute-set name many times no longer use memory that grows quadratically; some circular-reference errors name another cycle (1908) by gaborbernat.
Taking css_path() or xpath_path() of every element now takes time linear in the document, and anchors added by linkify_node() appear in later find_all() and select() results (2047) by gaborbernat.
Text after a raw table, list, lone tag or pipe table in to_markdown output is no longer read as raw HTML or a table row (2106) by gaborbernat.
Unwrapping a raw-text element such as script, textarea or noscript in a ~turbohtml.rewrite.rewrite handler now keeps its content as escaped text (1883) by gaborbernat.
Validating against a schema pattern no longer slows down with the number of members a character class lists (2114) by gaborbernat.
Validation of deeply nested XML documents against XML Schema and RELAX NG no longer crashes worker threads with small stacks (2061) by gaborbernat.
With Markdown.Images(mode="alt"), markup in an image's alt text is now escaped like prose, so it no longer reaches a Markdown reader as HTML (2103) by gaborbernat.
XML Schema and RELAX NG validation reject dates whose day does not exist in their month, such as February 29 in common years (1900) by gaborbernat.
XSD validation now accepts an empty element where a complex type's optional xs:all content allows no children (2056) by gaborbernat.
XSLT generate-id() now gives attribute and namespace nodes ids that differ from their element's and from each other (1904) by gaborbernat.
XSLT expressions, keys and xsl:number now take attribute nodes as context, generate-id() gives each attribute its own id, and key patterns with alternatives match all of them (2052) by gaborbernat.
ElementView.drop_tree() no longer copies the tail onto the dropped element, so repeated drops within one parent take linear time (1935) by gaborbernat.
Minify output of a parse_xml doctype with > in its system identifier no longer reparses the rest of the identifier as markup, and drops the identifiers instead (2096) by gaborbernat.
Node.encode with Html(meta_charset=True) no longer declares a codec that no WHATWG encoding label names, such as iso2022_jp_2, hz, or UTF-16, which browsers could not read back; it raises ValueError instead by Bernát Gábor.
Node.encode with Html(meta_charset=True) now declares the WHATWG name of the encoding it writes, so iso2022_jp declares ISO-2022-JP where it used to declare a codec name browsers ignore. UTF-8 is declared as utf-8, the spelling serialize() uses (1838) by gaborbernat.
Node.find() and Node.find_all() with a regex or callable text no longer write out of bounds when a callable filter adds elements mid-search, and skip those elements (1995) by gaborbernat.
XMLSchema and RelaxNG validation raises TypeError for a node that is neither a document nor an element, instead of crashing the interpreter (1973) by gaborbernat.
clean_url and extract_links no longer cut a URL inside its authority when the cut would change the host, so links to other sites stay visible (1974) by gaborbernat.
clean_url and extract_links now keep links whose host is a web host only once canonicalized, and return the canonical form (1982) by gaborbernat.
linkify_node no longer crashes when a link callback removes the text or <a> it is linking; the removed node keeps what the callback left (1957) by gaborbernat.
minify_css keeps time and memory linear when a short rule repeats a much longer rule's selector; the short rule now stays separate (1915) by gaborbernat.
parse(bytes) and detect() no longer cut a <meta> name or value at a NUL byte, so a label containing one no longer selects an encoding (1939) by gaborbernat.
rewrite() now reads markup in and around <svg>, <math>, <template> and <frameset> as browsers do, so handlers see every element a browser builds there (2002) by gaborbernat.
xs:duration values with a fraction of a second, such as PT1.5S, now validate, and range facets order them by their full value (1905) by gaborbernat.
xsl:import and RELAX NG hrefs that percent-decode to a UNC path are now rejected, as undecoded UNC hrefs already were (1962) by gaborbernat.
article() now raises MemoryError when memory runs out while reading page metadata, instead of silently dropping fields (1978) by gaborbernat.
RELAX NG validation no longer re-derives a shared definition on every path that reaches it, removing an exponential slowdown (1811) by gaborbernat.
RELAX NG validation no longer slows down with the square of the child count when many children each match one branch of a wide interleave, group or choice (2048) by gaborbernat.
RELAX NG validation now bounds the work each tag, attribute and text run costs by the schema's size, raising ValueError for content models too ambiguous to fit (2027) by gaborbernat.
RELAX NG validation now raises ValueError when a content model needs more alternatives than the schema's size allows, instead of using time and memory that grow exponentially (1889) by gaborbernat.
~turbohtml.validate.RelaxNG compiles very wide patterns, and raises RecursionError when references nest 400 levels deep without an element (1901) by gaborbernat.
~turbohtml.validate.XMLSchema now raises ValueError for an XSD schema whose xs:group references nest 400 levels or deeper, instead of crashing the interpreter during validation (2086) by gaborbernat.
~turbohtml.validate.XMLSchema now raises ValueError for an XSD schema whose references expand to more than 20,000 particles and attributes, instead of exponential validation time and memory (1949) by gaborbernat.
~turbohtml.validate.XMLSchema validation and compilation no longer slow down as a schema declaration carries more attributes or namespace declarations (2109) by gaborbernat.
turbohtml.parse_xml no longer takes time quadratic in the input size when a namespace URI is long (1928) by gaborbernat.
~turbohtml.clean.minify_js no longer slows down with the depth of parentheses or immediately invoked function wrappers around a script (2005) by gaborbernat.
~turbohtml.clean.minify_js no longer slows with the depth of nested redundant blocks and constant branches, and drops statements after a jump only up to the next declaration (1952) by gaborbernat.
turbohtml.Node.canonicalize now raises ValueError when repeated namespace declarations outgrow the rest of the output, so a small document can no longer expand into gigabytes (2214) by gaborbernat.
~turbohtml.Element.form_data and ~turbohtml.Element.field_value no longer rescan an optgroup's or fieldset's attributes for every option or legend, which made large pages quadratic (1924) by gaborbernat.
~turbohtml.Node.find and ~turbohtml.Node.find_all with a regex, callable or list text filter now use memory linear in the document on deeply nested elements (2068) by gaborbernat.
~turbohtml.Node.to_markdown no longer crashes the interpreter on an XML document, a fragment, a shadow root or a detached inline element whose content ends in a line break, a no-break space or emphasized punctuation with no block element around it (1784) by gaborbernat.
A select mirrors its shown option into at most 16 selectedcontent elements. The rest keep the content the source gave them, so a page with many of them no longer builds a quadratic number of DOM nodes (1816) by gaborbernat.
A same-scheme reference with an encoded dot segment now resolves as a path under the base URL when its remainder has a colon in the first path segment, as the WHATWG URL standard specifies. Such references no longer use memory that grows quadratically with their length in Document.base_url(), meta_refresh() and link and structured-data extraction (1826) by gaborbernat.
A schema with many pattern facets now shares one size limit across all of them, so compiling it can no longer exhaust memory (2092) by gaborbernat.
A single matches() or closest() call with :disabled, :enabled, :read-write or :read-only now takes linear time inside disabled fieldset elements, including deeply nested ones (2007) by gaborbernat.
A stylesheet with many statement at-rules, such as @import, no longer takes quadratic time to parse in ~turbohtml.cssom.StyleSheet or ~turbohtml.cssom.computed_style (1819) by gaborbernat.
Absolute XPath paths in predicates no longer take quadratic time on deeply nested XML when the expression also reads a node-set variable or calls an extension function (2021) by gaborbernat.
Absolute XPath paths in predicates, and in XSLT select and test expressions, no longer take quadratic time on deeply nested XML (1936) by gaborbernat.
Adding nodes to a document one call at a time no longer stores a separate copy of each attribute value they share, keeping memory linear (2008) by gaborbernat.
An XPath expression that names many large regular expressions no longer keeps gigabytes of their compiled patterns allocated until it returns (2038) by gaborbernat.
An XPath location path that is only tested for emptiness, as a predicate, an operand of and or or, an argument of not() or boolean(), or the test of xsl:if or xsl:when, now stops at the first node it selects. Before, each candidate collected the whole axis, so evaluation time grew quadratically with the length of a sibling list (1820) by gaborbernat.
An <html> start tag in fragment input no longer sets attributes on the element returned as the fragment's context (1910) by gaborbernat.
Back-reference matching in XPath regular expressions now counts every compared character against the step budget, so patterns with long captured groups raise ValueError promptly (1981) by gaborbernat.
Bound the emphasis to_markdown reopens under deeply nested <b>, <i> or <s> elements, dropping inner runs of the same kind past the limit, so output stays proportional to the input (1975) by gaborbernat.
Bound the time sanitize, sanitize_node and migration.bleach.clean spend on deeply nested disallowed elements when the output must also be parse-stable, and escape a link nested in a link that follows an element that escapes to nothing. Past 32 levels, the output of sanitize_node, of sanitize on input that must be parse-stable, and of migration.bleach.clean can differ from before, and sanitize_node agrees with sanitize on such input (1830) by gaborbernat.
Bound the time and memory ~turbohtml.clean.minify_css spends on nested @media blocks that repeat a prelude at every level. Blocks fuse only when at most seven blocks enclose them, so deeper same-query blocks stay separate (1798) by gaborbernat.
Building a tree with parse_into or walking SAX events no longer costs time and memory quadratic in the input when attributes are copied many times (1885) by gaborbernat.
CSS minification returns a stylesheet unchanged whenever its minified form would contain </style, so a minified <style> body can no longer end its element early (1812) by gaborbernat.
CSS selector queries, computed_style and rewrite no longer slow down quadratically with nesting depth when a selector uses a descendant combinator, :lang(), :dir() or :has() (2193) by gaborbernat.
Calling ~turbohtml.Node.canonicalize on an element below the root no longer takes time quadratic in the number of inherited xml: attributes (1976) by gaborbernat.
Canonicalizing parsed XML with many namespace declarations no longer stalls turbohtml.Node.canonicalize (1884) by gaborbernat.
Combining the xml:base attributes above a subtree in Canonical XML 1.1 took time that grew with the square of their nesting depth; it now grows with their total length (1844) by gaborbernat.
Compile a regular expression with many named groups in linear time: matches, replace, re:test and re:replace no longer compare each (?P<name>...) with every earlier name, which made a pattern with many named groups take quadratic time to compile (1839) by gaborbernat.
Compiling a RelaxNG or XMLSchema schema whose elements carry many attributes, and validating documents against it, no longer takes time quadratic in its size (2130) by gaborbernat.
Compiling a deeply nested XML Schema or RELAX NG schema no longer crashes worker threads with small stacks, including schemas that chain group references (2095) by gaborbernat.
Compiling an XML Schema where many simple types derive from one base with many facets now takes time and memory linear in the schema's size (2043) by gaborbernat.
Compiling and applying an XSLT stylesheet now takes time linear in its size instead of quadratic, so a large nested or attribute-heavy stylesheet no longer holds the process for seconds (2111) by gaborbernat.
Converting a list item nested inside another list item to Markdown no longer crashes the Python process (2066) by gaborbernat.
Converting a long internationalized host to punycode now takes time close to linear in its length, and a host that mapping lengthens past 16384 code points stays Unicode (2016) by gaborbernat.
Converting a long run of <br> elements in ~turbohtml.Node.to_markdown now takes linear time; a block inside a link dropped by strip or convert ends the run (2101) by gaborbernat.
Copying a document or moving nodes between documents no longer uses memory that grows with the square of the input size (1969) by gaborbernat.
Copying or sanitizing a ShadowRoot now returns a DocumentFragment holding its children, not a shadow root (1987) by gaborbernat.
Deeply nested XSLT key lookups now raise RecursionError instead of crashing the interpreter (1964) by gaborbernat.
Deeply nested documents no longer expand into millions of nodes; formatting elements the depth limit cannot reopen are now dropped (1951) by gaborbernat.
Descendant :has() queries no longer take time quadratic in the nesting depth of a document, however it was built or edited (1821) by gaborbernat.
Escape the text of a raw-text node such as xmp or style when sanitize returns a parsed node as a string (1914) by gaborbernat.
Extract Atom type="xhtml" text in linear time when one element carries many namespace-prefixed attributes (1804) by gaborbernat.
Feeding turbohtml.IncrementalParser, turbohtml.Tokenizer or turbohtml.migration.stdlib.HTMLParser a character reference whose digits, or whose name characters past the longest entity name, never end no longer takes time quadratic in its length: the suspended reference resumes its scan where the last chunk ran out instead of starting over at its & (1828) by gaborbernat.
Find an attribute's source text in time linear in the attribute count while cleaning with turbohtml.migration.bleach.clean; a start tag with many attributes no longer stalls it (1795) by gaborbernat.
Fix an out-of-bounds read in to_markdown for an emphasis element wrapping an image without alt text in Markdown.Images(mode="alt"); such an image now adds nothing to the output (2107) by gaborbernat.
Fix an out-of-bounds write through ElementView.getroottree().getroot() for elements in shadow trees and document fragments; the root is now the outermost element (1912) by gaborbernat.
Follow only the references the XSD cycle check covers when validating: XMLSchema.validate also walked a complexContent or simpleContent nested in an attribute group or a derivation, a type's second content child, and a group reference inside an xs:annotation, so a circular schema compiled and then overflowed the C stack. An annotation in an xs:choice no longer counts as an empty branch (1786) by gaborbernat.
Foreign <script> and <style> elements inside <svg> or <math>, and HTML <script> and <style> elements that were given element children through the DOM API, now supply only their own text children to ~turbohtml.Document.json_ld, ~turbohtml.Document.structured_data, ~turbohtml.extract.dates and computed_style. Text inside an element child, or inside a nested one, no longer joins the outer block or sheet (1832) by gaborbernat.
HTML, sanitized HTML, minified HTML and canonical XML no longer repeat an unclosed formatting element's attributes without limit, so output stays linear in input size (2035) by gaborbernat.
Ignore a <base href> or feed xml:base that resolves to more than 2,048 characters, so extractors no longer slow down on long bases (1933) by gaborbernat.
Indentation in Html(layout=Indent()) stops at 64 nesting levels, so deeply nested documents no longer serialize to output quadratic in their size (1919) by gaborbernat.
Items that share one large itemref subtree no longer cost time quadratic in its size when microdata() or structured_data() reads them (1989) by gaborbernat.
Keep ~turbohtml.clean.minify_css linear in the number of rules when a merged rule merges again into an earlier rule (1934) by gaborbernat.
Keep a calc() whose folded coefficient reaches the most negative 64-bit integer unfolded in minify_css instead of crashing with a division error or writing a wrong value (1785) by gaborbernat.
Keep the text of a RELAX NG include or externalRef target alive while its tree is copied into the schema, so compiling a multi-file schema no longer reads freed memory (1792) by gaborbernat.
Leave out Microdata and RDFa text properties nested more than 32 deep, instead of repeating their text at every level (1938) by gaborbernat.
Limit the bracket nesting ~turbohtml.clean.linkify and ~turbohtml.clean.LinkDetector follow in a URL to 32 levels so a run of links that each precede an unclosed bracket no longer takes quadratic time to scan (1805) by gaborbernat.
Limit the nested <time> and date-marked elements whose text ~turbohtml.extract.dates scans to eight levels, which keeps the scanning time proportional to the page size on deeply nested markup. Deeper elements are dated from their datetime or title attribute only; their signal can change from time to text, or the date can be None with extensive_search=False (1797) by gaborbernat.
Linkify reads a written tel: URI's payload only up to the phone number length limit when phone detection is on (1833) by gaborbernat.
Links and rewrites no longer repeat work and memory for each copy of a reopened formatting element; rewrite_links calls its function once for those copies (2059) by gaborbernat.
List an option only for its nearest select in ~turbohtml.Element.form_data and ~turbohtml.Element.field_value, so nested selects and options cannot multiply the returned values (1929) by gaborbernat.
Loading a pickled document with deeply nested elements no longer takes time that grows with its node count times its depth (1923) by gaborbernat.
Long link targets, titles, languages and HTML attributes repeated in copies of an unclosed link or code element no longer multiply Markdown or text output; copies over the limit drop them (1945) by gaborbernat.
Make ~turbohtml.query.Query.closest take linear time on deep XML trees, instead of quadratic time (1984) by gaborbernat.
Markdown export of emphasis around many empty quotes or preserved-white-space elements no longer takes quadratic time, and emphasis after punctuation followed by a long run of empty elements is written as an HTML tag (2079) by gaborbernat.
Markdown output escapes < in link and image titles and in bare link destinations, so a reader that rejects the link shows the text, not raw HTML (2065) by gaborbernat.
Matching CSS selectors or a class_ filter no longer takes quadratic time when a page has one long class or attribute value above, or repeated across, many elements (2087) by gaborbernat.
Matching a CSS selector with a very long chain of combinators raises RecursionError when the thread's stack cannot hold it, instead of crashing (2205) by gaborbernat.
Merge the attributes of repeated <html> and <body> start tags in time and memory linear in the attribute count, so a page with many such tags can no longer make turbohtml.parse take quadratic time or allocate quadratic memory (1808) by gaborbernat.
Microdata extraction no longer slows down sharply on an itemprop attribute that lists thousands of names (2049) by gaborbernat.
Microdata extraction now raises RecursionError past fixed limits on items and properties shared through itemref, instead of spending exponential or quadratic time (2020) by gaborbernat.
Minify JavaScript in linear time when parenthesized groups hold regex or template literals with parentheses, and reject await or yield in arrow parameters (2085) by gaborbernat.
Minify serialization of deeply nested XML-derived trees no longer takes quadratic time; rt, rp and optgroup end tags deeper than the parser's limit are kept (2058) by gaborbernat.
Minifying JavaScript no longer slows down on scripts with many nested unary operators (1983) by gaborbernat.
Minifying JavaScript that redeclares a catch parameter with var or reads arguments many times now takes time linear in the script length (2067) by gaborbernat.
Minifying JavaScript with deeply nested constant-false branches or unreachable statements that keep a declaration no longer takes time quadratic in the nesting depth (2051) by gaborbernat.
Minifying deeply stacked JavaScript chains no longer crashes the process; they raise nested too deeply, and some long scripts that minified before now fail the same way (2069) by gaborbernat.
Nested :nth-child(... of S) selectors no longer translate S once per use, and a selector whose XPath would pass 16,777,216 characters raises ~turbohtml.convert.ExpressionError from ~turbohtml.convert.css_to_xpath instead of building an unbounded expression (1817) by gaborbernat.
Parsing a select whose optgroup has many attributes and many option elements no longer takes time quadratic in the input size (1818) by gaborbernat.
Parsing a select with misnested formatting elements and option elements between them no longer takes time quadratic in the number of nodes under that select. When a select holds more than sixteen enabled selectedcontent elements, the clones go to the first sixteen targets in the order the select lists them, which can differ from the order used before (1822) by gaborbernat.
Parsing a formatting element with many attributes that the parser reopens many times now uses memory linear in the input; past a bound, reopened copies carry no attributes (2070) by gaborbernat.
Parsing an XPath function call now stops at the first malformed argument, so a rejected expression no longer corrupts heap memory before raising ValueError (1870) by gaborbernat.
Parsing and sanitizing HTML with many formatting elements now takes time linear in the size of the document (1886) by gaborbernat.
Parsing and sanitizing a MathML annotation-xml element with many attributes and many children no longer takes time quadratic in the input size. The parser reads the element's encoding attribute once, when the start tag is parsed, and the sanitizer reads it once per element rather than once per child (1807) by gaborbernat.
Parsing and sanitizing markup with many active formatting elements no longer takes time that grows with the square of the input size (1941) by gaborbernat.
Parsing reopens only the 16 innermost unclosed formatting elements per block and drops the outer ones, which bounds memory use on hostile markup (2057) by gaborbernat.
Parsing tables with text that alternates between two runs no longer slows down or uses excessive memory (2033) by gaborbernat.
Parsing, tokenizing, and xsl:key lookups stay fast when a document uses many attribute or key names that happen to collide; output is unchanged (1843) by gaborbernat.
Phone-number linking now runs in linear time on long text; the links found are unchanged (2082) by gaborbernat.
Positional selectors such as :first-of-type and :nth-child() no longer take time quadratic in the length of a long sibling list (1947) by gaborbernat.
Preceding-axis searches from deeply nested elements, including find, find_all, preceding and XPath preceding::, now take linear time instead of quadratic time (1943) by gaborbernat.
Prevent a double free when MutationObserver.take_records() or deliver() fails part-way through a batch, as it does on an attribute whose name is a lone surrogate. The failed drain now drops its batch, and a drain no longer reads observer state that take_records(), deliver() or disconnect() changes while a record is being built (1790) by gaborbernat.
Prevent an out-of-bounds read in the parser when malformed markup, nesting past the depth cap, or a foreign fragment context emptied its open-element stack (1840) by gaborbernat.
Prevent an out-of-bounds write in ~turbohtml.IncrementalParser when an ISO-2022-JP chunk ends on the escape byte that cuts a two-byte character short (1791) by gaborbernat.
Prevent an out-of-bounds write in minify_css when a background layer consists of a lone / (1787) by gaborbernat.
Prevent an out-of-bounds write when Markdown export closes emphasis after a stale hard line break, and keep converter text that was dropped (1911) by gaborbernat.
Prevent an out-of-bounds write when Markdown export wraps a short bold or italic run in a non-ASCII wrapper (1788) by gaborbernat.
RDFa vocab and prefix IRIs longer than 256 code points are now ignored, which keeps rdfa() memory bounded on untrusted pages (1913) by gaborbernat.
RELAX NG and XSD validation no longer keep a copy of each whitespace-normalized value until the call returns (1918) by gaborbernat.
RELAX NG schemas whose interleave branches overlap through a wildcard name, a <ref>, a mixed or a later combine="interleave" part now raise ValueError at compile time instead of compiling. Interleave checks on very large grammars raise ValueError once they exceed a fixed amount of work (1799) by gaborbernat.
RELAX NG schemas with a long xml:base over many references compile in linear time; a base URI over 8,192 characters now raises ValueError (2054) by gaborbernat.
RELAX NG schemas with overlapping attribute names in one group or interleave, or an anyName or nsName attribute outside oneOrMore or zeroOrMore, now raise ValueError when compiled (2037) by gaborbernat.
Raise UnicodeEncodeError when Node.encode would write U+000E, U+000F or U+001B under an ISO-2022 codec such as iso-2022-jp. Those characters switch the state of a reader's decoder, so markup holding one could be read differently from the markup that was serialized; etree.tostring writes the three as character references (1813) by gaborbernat.
Raise ValueError instead of crashing the interpreter when a stylesheet calls system-property(), function-available() or element-available() without an argument; a call with more than one is rejected too (1782) by gaborbernat.
Read a <tr> inside a table cell as that cell's content, and limit the cell text Node.tables() repeats for tables nested inside two or more other tables to 16,000,000 characters per call, so a page of deeply nested tables cannot expand into gigabytes of text (1810) by gaborbernat.
Read the feed-level Atom <author> once per feed instead of once per entry that inherits it, so ~turbohtml.extract.feed no longer takes time and memory that grow with the product of the entry count and the size of that <author> (1814) by gaborbernat.
Reading ~turbohtml.Node.assigned_slot, assigned_nodes() or ~turbohtml.Node.flattened_children for every child or slot of a shadow tree no longer takes time quadratic in the size of the tree (2004) by gaborbernat.
Refuse an xsl:import or RELAX NG externalRef/include path longer than the platform path limit, even when it would normalize shorter, so a long href is rejected quickly (1916) by gaborbernat.
Reject JavaScript whose class extends clauses nest past the minifier's depth limit with ValueError instead of overflowing the C stack (1867) by gaborbernat.
Reject a script whose identifier holds a malformed \u escape or one for a code point a name cannot spell, and stop joining string literals whose \x or \u escape has no value, so minify_js never returns a str holding a code point past U+10FFFF (1783) by gaborbernat.
Removing elements with turbohtml.etree.strip_elements now takes time linear in the tree size, even when the tree is deeply nested (1986) by gaborbernat.
Resolve RDFa prefix declarations in time linear in the page: an element that declares a prefix no longer copies every mapping in scope, so many declaring elements under an ancestor with a large prefix no longer stall ~turbohtml.Document.rdfa and ~turbohtml.Document.structured_data (1794) by gaborbernat.
Resolve namespace prefixes and xml:base values in RSS, RDF and At
Avoid false encoding fuzz failures when html5lib keeps an unmatched paragraph end tag inside foreign content (#1659) by @gaborbernat.
<a name="release-1-15-10-fixed"></a>
Avoid false encoding fuzz failures when html5lib keeps an unmatched paragraph end tag inside foreign content (1659) by gaborbernat.
Keep emphasis continuous across paragraphs flattened into a Markdown table cell (1663) by gaborbernat.
Keep emphasis runs separate across blocks flattened into Markdown table cells (1658) by gaborbernat.
Preserve line breaks in HTML attribute values inside Markdown table cells (1661) by gaborbernat.
Preserve nested emphasis across block boundaries in HTML-to-Markdown conversion (1660) by gaborbernat.
Skip unsupported CSS shorthand values in the stylesheet fuzz oracle (1657) by gaborbernat.
Keep one-shot and streaming encoding detection consistent when an unmapped byte disqualifies the logical Hebrew candidate. Both now use the same punct
<a name="release-1-15-9-fixed"></a>
MemoryError and emit balanced CSS when an unterminated function reaches the nesting limit (#1641) by @gaborbernat.Keep one-shot and streaming encoding detection consistent when an unmapped byte disqualifies the logical Hebrew candidate. Both now use the same punctuation tiebreak to select the encoding (1637) by gaborbernat.
Avoid a MemoryError and emit balanced CSS when an unterminated function reaches the nesting limit (1641) by gaborbernat.
Keep XML comments well formed when invalid characters follow or separate hyphens (1649) by gaborbernat.
Keep malformed CSS math functions stable when their raw fallback ends inside a nested function (1645) by gaborbernat.
Keep the encoded-text fuzz check aligned with current HTML select parsing when style or title content appears inside select (1640) by gaborbernat.
Normalize leading whitespace in XML processing instruction data so the serialized output remains stable when reparsed (1648) by gaborbernat.
Omit hidden elements from Markdown code blocks and spans (1644) by gaborbernat.
Omit invalid namespace declarations when serializing HTML as XML, so the output parses as XML (1643) by gaborbernat.
Preserve carriage returns in HTML nested inside Markdown table cells (1652) by gaborbernat.
Preserve declaration boundaries when a CSS value ends in an unpaired backslash (1647) by gaborbernat.
Preserve emphasis on the cells of irregular tables exported as raw HTML in Markdown (1638) by gaborbernat.
Preserve repeated spaces in image attributes when rendering Markdown tables (1646) by gaborbernat.
Preserve token separators after hex escapes in CSS function arguments (1651) by gaborbernat.
Recognize character references for control whitespace in Markdown fuzz checks (1650) by gaborbernat.
to_text and to_annotated_text keep a list's content that is not an : text or a block before the first item renders on its own, and one after an item c
<a name="release-1-15-8-fixed"></a>
to_text and to_annotated_text keep a list's content that is not an <li>: text or a block before the first item renders on its own, and one after an item continues it, indented under its marker, so an unclosed list no longer drops the rest of the document (#1625) by @gaborbernat. (#1621)<script>, <style> and other raw-text elements from a nested table or list written as HTML inside a table cell, so a < or backtick in a script no longer swallows the cell text after it and a <?...> no longer shows as literal text when the Markdown is read back (#1632) by @gaborbernat. (#1630)[ or { block with a ) inside, or inside an invalid unicode-range value: a closer now ends only a block of its own kind, as CSS Syntax 3 reads it, so the closers written at the end of the input match what the next pass reads (#1634) by @gaborbernat. (#1633)and/or chains with more than 1,024 operands, no longer fail Node.xpath with an expression nested too deeply (#1631) by @gaborbernat.@media block onto one that ends in stray text, which fused the text into the next rule's selector and made a second pass change the output (#1626) by @gaborbernat.~turbohtml.Node.to_text and ~turbohtml.Node.to_annotated_text keep a list's content that is not an <li>: text or a block before the first item renders on its own, and one after an item continues it, indented under its marker, so an unclosed list no longer drops the rest of the document (1625) by gaborbernat. (1621)
Drop processing instructions and the text of <script>, <style> and other raw-text elements from a nested table or list written as HTML inside a table cell, so a < or backtick in a script no longer swallows the cell text after it and a <?...> no longer shows as literal text when the Markdown is read back (1632) by gaborbernat. (1630)
Keep CSS minification stable across repeated passes when the input ends inside a function whose arguments hold an open [ or { block with a ) inside, or inside an invalid unicode-range value: a closer now ends only a block of its own kind, as CSS Syntax 3 reads it, so the closers written at the end of the input match what the next pass reads (1634) by gaborbernat. (1633)
Compound CSS selectors with more than 1,024 simple selectors, and XPath and/or chains with more than 1,024 operands, no longer fail Node.xpath with an expression nested too deeply (1631) by gaborbernat.
Escape Markdown specials in the text of a nested table or list written as HTML inside a table cell, so a backtick or asterisk there no longer turns into a code span or emphasis when the Markdown is read back (1624) by gaborbernat.
Stop CSS minification joining a same-query @media block onto one that ends in stray text, which fused the text into the next rule's selector and made a second pass change the output (1626) by gaborbernat.
Avoid an out-of-bounds read in minify_css when memory allocation fails while minifying a + operator in a math function (#1613) by @gaborbernat.
<a name="release-1-15-7-fixed"></a>
minify_css when memory allocation fails while minifying a + operator in a math function (#1613) by @gaborbernat.minify_css when memory allocation fails while minifying a nested selector (#1598) by @gaborbernat.Node.xpath with an expression nested too deeply (#1608) by @gaborbernat.url( is left open at the end of the input (#1602) by @gaborbernat.@import url( holds a quote, a comment is left open at the end of the input, merged rules match the rule before them, or stray top-level text runs into the next node; StyleRule.selector_text also keeps a trailing escaped space (#1615) by @gaborbernat.to_markdown passes through as raw HTML in one HTML block when their content holds a blank line, instead of reading the rest as Markdown (#1606) by @gaborbernat.MemoryError instead of crashing or returning a wrong result when Text.data assignment, Node.equals(), copy.copy()/copy.deepcopy(), Element.normalize(), Range content operations, main_text(), article(), collapse_whitespace_node(), XMLSchema.validate(), RelaxNG compilation or an XSLT xsl:strip-space cannot materialize parsed text (#1617) by @gaborbernat.MemoryError instead of crashing when canonicalization, pretty-printing, minification, Markdown rendering, to_source() or a find(text=) regex scan cannot materialize parsed text (#1600) by @gaborbernat.MemoryError instead of crashing, raising SystemError or returning a wrong verdict when RelaxNG compilation or RelaxNG.validate() cannot allocate; XMLSchema compilation and validation raise it too instead of keeping a partial schema or a wrong verdict (#1620) by @gaborbernat.<a name="release-1-15-7-security"></a>
Avoid an out-of-bounds read in minify_css when memory allocation fails while minifying a + operator in a math function (1613) by gaborbernat.
Avoid an out-of-bounds read in minify_css when memory allocation fails while minifying a nested selector (1598) by gaborbernat.
CSS selector lists and XPath unions with more than 1,024 alternatives no longer fail Node.xpath with an expression nested too deeply (1608) by gaborbernat.
Drop attribute names CommonMark cannot read from the raw HTML that Markdown output embeds for nested tables and HTML-mode images, so the tag renders as HTML instead of literal text (1596) by gaborbernat.
Keep CSS minification stable across repeated passes when a block, function or bad url( is left open at the end of the input (1602) by gaborbernat.
Keep CSS minification stable across repeated passes when an at-statement follows stray top-level text (1604) by gaborbernat.
Keep CSS minification stable across repeated passes when an unquoted @import url( holds a quote, a comment is left open at the end of the input, merged rules match the rule before them, or stray top-level text runs into the next node; StyleRule.selector_text also keeps a trailing escaped space (1615) by gaborbernat.
Keep tables and images that to_markdown passes through as raw HTML in one HTML block when their content holds a blank line, instead of reading the rest as Markdown (1606) by gaborbernat.
Raise MemoryError instead of crashing or returning a wrong result when Text.data assignment, Node.equals(), copy.copy()/copy.deepcopy(), Element.normalize(), Range content operations, main_text(), article(), collapse_whitespace_node(), XMLSchema.validate(), RelaxNG compilation or an XSLT xsl:strip-space cannot materialize parsed text (1617) by gaborbernat.
Raise MemoryError instead of crashing when canonicalization, pretty-printing, minification, Markdown rendering, to_source() or a find(text=) regex scan cannot materialize parsed text (1600) by gaborbernat.
Raise MemoryError instead of crashing, raising SystemError or returning a wrong verdict when RelaxNG compilation or RelaxNG.validate() cannot allocate; XMLSchema compilation and validation raise it too instead of keeping a partial schema or a wrong verdict (1620) by gaborbernat.
Compile XPath expressions whose predicates hold long operator chains without exhausting the C stack (1611) by gaborbernat.
Limit plain-text list and quote indentation so deep nesting around little text cannot produce disproportionate output (#1585) by @gaborbernat.
<a name="release-1-15-6-security"></a>
Limit plain-text list and quote indentation so deep nesting around little text cannot produce disproportionate output (1585) by gaborbernat.
Avoid a crash during list text rendering when memory allocation fails (#1576) by @gaborbernat.
<a name="release-1-15-5-fixed"></a>
MemoryError when Markdown marker output allocation fails (#1582) by @gaborbernat.MemoryError when conformance checking cannot materialize parsed text (#1581) by @gaborbernat.<a name="release-1-15-5-security"></a>
Avoid a crash during list text rendering when memory allocation fails (1576) by gaborbernat.
Keep CSS minification stable across repeated passes when a mergeable rule follows a run of duplicates (1579) by gaborbernat.
Keep ISO-2022-JP detection consistent across chunk boundaries when escape sequences occur back to back (1575) by gaborbernat.
Raise MemoryError when Markdown marker output allocation fails (1582) by gaborbernat.
Raise MemoryError when conformance checking cannot materialize parsed text (1581) by gaborbernat.
Keep the HTML document root when a table cell reaches the parser's nesting limit (1578) by gaborbernat.
Limit plain-text table padding and omit absent cells to prevent disproportionate output and memory use (1580) by gaborbernat.
Prevent an out-of-bounds write while matching phone numbers with strict or exact grouping (1571) by gaborbernat.
Fix the license link in the PyPI project description (#1544) by @gaborbernat.
<a name="release-1-15-4-documentation"></a>
Fix the license link in the PyPI project description (1544) by gaborbernat.
Preserve XML names and visible content, Markdown whitespace, delimiters, and image URLs, and source text across chunked input. Keep CSS minification s
<a name="release-1-15-3-fixed"></a>
MemoryError for allocation failures in DOM, CSS, XPath, and extraction APIs. (#1536) by @gaborbernat.calc() expressions with comments in one pass. Bound parsing and sanitizing time on deeply nested lists, and avoid rescanning stray CSS preludes without a block. (#1537) by @gaborbernat.Reject explicit ports in file: URLs passed to normalize_url. (#1395) by @gaborbernat.
<a name="release-1-15-2-fixed"></a>
file: URLs passed to normalize_url. (#1395) by @gaborbernat.file: paths and web URLs with omitted authority slashes; reject hosts that map to an empty domain. (#1412) by @gaborbernat.blur(calc(1px + 2px)) to blur(3px). (#1414) by @gaborbernat.. and .. path segments from absolute document base URLs. (#1419) by @gaborbernat.MemoryError when XPath or XSLT runs out of memory instead of reporting malformed input or returning a result. (#1426) by @gaborbernat.xml:* attributes when exclusively canonicalizing XML or HTML subtrees. (#1452) by @gaborbernat.xml:base values across omitted ancestors when Canonical XML 1.1 serializes a subtree. (#1453) by @gaborbernat.Element.css_path() so the path selects the element in HTML and XML trees. (#1454) by @gaborbernat.\w and \W using Unicode general categories instead of treating every non-ASCII character as a word character. (#1456) by @gaborbernat.\i, \I, \c, and \C against the XML 1.0 name character ranges. (#1457) by @gaborbernat.\d and \D against Unicode decimal digits rather than ASCII digits alone. (#1458) by @gaborbernat.!important precedence over later normal declarations. (#1469) by @gaborbernat.srcset and imagesrcset URLs when finding, rewriting, and checking image candidates. (#1470) by @gaborbernat.xml:base values in XML feeds, including Atom and RSS links. (#1471) by @gaborbernat.border, border-*, and outline. Apply all to supported properties except direction, while preserving cascade order and importance. (#1472) by @gaborbernat.profile or other parameter. (#1474) by @gaborbernat.type="xhtml" text constructs when extracting feeds. (#1483) by @gaborbernat.href references against xml:base. (#1491) by @gaborbernat.base_url. (#1492) by @gaborbernat.rdf:about against xml:base when populating its ID. (#1497) by @gaborbernat.@prefix. (#1500) by @gaborbernat.dc:title as an RSS or RDF feed or item title when its core title is absent. (#1502) by @gaborbernat.<style> blocks when resolving computed styles, with case-sensitive type matching for SVG. (#1512) by @gaborbernat.:reference CURIEs with the fixed default prefix, ignoring attempts to redefine it. (#1514) by @gaborbernat.about and resource attributes. (#1517) by @gaborbernat.prefix IRIs against the document base. (#1521) by @gaborbernat.<feed> roots, including when no default namespace is declared. HTML feed discovery remains unchanged. (#1524) by @gaborbernat.version="2.0" on XML RSS 2.0 roots. HTML feed discovery remains unchanged. Fold unitless zero in nested CSS math without dropping units from typed zero. (#1526) by @gaborbernat.property and typeof. (#1529) by @gaborbernat.<a name="release-1-15-2-packaging"></a>
-Werror. (#1494) by @gaborbernat.Reject explicit ports in file: URLs passed to ~turbohtml.extract.normalize_url. (1395) by gaborbernat.
Reject malformed XML qualified names in element, attribute, and namespace declarations. (1396) by gaborbernat.
Restore the empty XML namespace for HTML elements nested under SVG or MathML. (1397) by gaborbernat.
Omit invalid public identifiers from XML output while retaining valid system identifiers. (1398) by gaborbernat.
Drop XML-forbidden characters from doctype system identifiers during XML serialization. (1399) by gaborbernat.
Omit invalid Unicode attribute names from XML serialization. (1400) by gaborbernat.
Require XML whitespace around doctype external identifiers. (1401) by gaborbernat.
Reject relative namespace URIs during XML canonicalization. (1402) by gaborbernat.
Limit inherited XML attributes in Canonical XML 1.1 output. (1403) by gaborbernat.
Omit invalid processing-instruction targets from XML serialization. (1404) by gaborbernat.
Keep CSS backgrounds with two colors invalid during minification. (1405) by gaborbernat.
Resolve backslashes as separators in relative web URLs. (1406) by gaborbernat.
Keep CSS borders with two widths invalid during minification. (1407) by gaborbernat.
Keep required spaces around math operators in CSS filters. (1408) by gaborbernat.
Keep CSS borders with two colors invalid during minification. (1409) by gaborbernat.
Normalize file: paths and web URLs with omitted authority slashes; reject hosts that map to an empty domain. (1412) by gaborbernat.
Shorten constant CSS filter calculations, such as blur(calc(1px + 2px)) to blur(3px). (1414) by gaborbernat.
Resolve links beginning with backslashes against HTTP(S) document URLs the way browsers do. (1416) by gaborbernat.
Resolve links with extra leading slashes to their target host, matching browser URL handling. (1417) by gaborbernat.
Resolve HTTP(S) links and document base URLs with backslash authority separators without adding a path slash. (1418) by gaborbernat.
Remove literal . and .. path segments from absolute document base URLs. (1419) by gaborbernat.
Percent-encode brackets in URL userinfo when resolving document base URLs. (1420) by gaborbernat.
Resolve document base URLs with canonical hosts, file paths, and relative non-special schemes; reject malformed web hosts when cleaning URLs. (1421) by gaborbernat.
Raise MemoryError when XPath or XSLT runs out of memory instead of reporting malformed input or returning a result. (1426) by gaborbernat.
Keep CSS shorthand merges on one side of nested rules, and drop fallback fragments when resolving empty HTML base URLs. (1434) by gaborbernat.
Preserve invalid background declarations and both background-size components during CSS minification. (1435) by gaborbernat.
Preserve token boundaries in CSS filter values, including before variable functions and inside unresolved functions. (1436) by gaborbernat.
Reject qualified XML element and attribute names whose local part starts with an invalid character, and namespace declarations whose prefix starts with one. (1437) by gaborbernat.
Treat a backslash after a web URL's authority as one path separator and normalize following dot segments when resolving document URLs. (1438) by gaborbernat.
Resolve literal and encoded parent segments in special URL references that omit the authority slashes, including same-scheme encoded dots and backslash path separators. (1439) by gaborbernat.
Resolve single-slash and single-backslash special URL references before removing path segments. (1440) by gaborbernat.
Use the document fallback URL when a base element's href cannot be parsed, including missing or malformed hosts. (1441) by gaborbernat.
Resolve or reject special URL hosts before shortening paths after extra authority slashes. (1442) by gaborbernat.
Resolve a same-scheme special URL ending in a backslash to the host root instead of adding a second slash. (1446) by gaborbernat.
Reject extra host text after a bracketed IPv6 address. (1447) by gaborbernat.
Reject URL ports containing characters outside 0–9 or values above 65535 during normalization and cleaning. (1448) by gaborbernat.
Use the document URL when a relative base reference cannot resolve against an opaque-path URL. (1449) by gaborbernat.
Preserve a single-dot host when resolving a foreign special URL with one slash after its scheme. (1450) by gaborbernat.
Drop the fallback URL's fragment when resolving a reference that contains only the same special scheme. (1451) by gaborbernat.
Omit ancestor xml:* attributes when exclusively canonicalizing XML or HTML subtrees. (1452) by gaborbernat.
Resolve xml:base values across omitted ancestors when Canonical XML 1.1 serializes a subtree. (1453) by gaborbernat.
Escape CSS punctuation and leading digits in tag names and ID anchors returned by Element.css_path() so the path selects the element in HTML and XML trees. (1454) by gaborbernat.
Validate XML Schema name datatypes against the XML 1.0 character ranges instead of accepting every non-ASCII character. (1455) by gaborbernat.
Match XML Schema regex \w and \W using Unicode general categories instead of treating every non-ASCII character as a word character. (1456) by gaborbernat.
Match XML Schema regex name escapes \i, \I, \c, and \C against the XML 1.0 name character ranges. (1457) by gaborbernat.
Match XML Schema regex \d and \D against Unicode decimal digits rather than ASCII digits alone. (1458) by gaborbernat.
Apply XML Schema regex character class subtraction, including nested and negated classes. (1459) by gaborbernat.
Match XML Schema regex Unicode general category escapes, including complements and character classes. (1460) by gaborbernat.
Match XML Schema regex Unicode block escapes, including complements and character classes. (1461) by gaborbernat.
Reject reversed XML Schema regex character ranges and multi-character range endpoints. (1462) by gaborbernat.
Reject malformed XML Schema regex character classes instead of compiling them with altered matching behavior. (1463) by gaborbernat.
Reject unknown and incomplete XML Schema regex escapes instead of treating them as literals. (1464) by gaborbernat.
Reject unmatched XML Schema regex parentheses instead of accepting partial patterns. (1465) by gaborbernat.
Reject malformed and misplaced XML Schema regex quantifiers, including unescaped braces. (1466) by gaborbernat.
Reject unescaped closing brackets outside XML Schema regex character classes. (1467) by gaborbernat.
Keep repeated CSS longhands when merging a shorthand would change which value wins. (1468) by gaborbernat.
Resolve CSS declaration names without ASCII case differences, while preserving custom-property case and !important precedence over later normal declarations. (1469) by gaborbernat.
Keep commas inside srcset and imagesrcset URLs when finding, rewriting, and checking image candidates. (1470) by gaborbernat.
Resolve feed links against nested xml:base values in XML feeds, including Atom and RSS links. (1471) by gaborbernat.
Resolve CSS-wide keywords across every supported longhand of border, border-*, and outline. Apply all to supported properties except direction, while preserving cascade order and importance. (1472) by gaborbernat.
Recognize CSS-escaped property names in declarations and computed styles while retaining their source spelling. (1473) by gaborbernat.
Extract JSON-LD scripts whose media type includes a profile or other parameter. (1474) by gaborbernat.
Honor rowspans above 1000 rows, up to the HTML table model's limit of 65534. (1475) by gaborbernat.
Ignore URL-like text inside CSS comments and strings when extracting or rewriting links. (1476) by gaborbernat.
Recognize RSS Content and Dublin Core fields by XML namespace URI when feeds use nonstandard prefixes. (1477) by gaborbernat.
Recognize RDF feed roots and item IDs by XML namespace URI when feeds use alternate prefixes. (1478) by gaborbernat.
Recognize Dublin Core and RSS content fields declared with a default XML namespace. (1480) by gaborbernat.
Read RSS 1.0 channel and item fields when the RSS namespace uses a prefix. (1481) by gaborbernat.
Read Atom feed and entry fields when the Atom namespace uses a prefix. (1482) by gaborbernat.
Preserve markup inside Atom type="xhtml" text constructs when extracting feeds. (1483) by gaborbernat.
Ignore Atom and RDF fields bound to a foreign default namespace when extracting feeds. (1485) by gaborbernat.
Preserve child XML markup in Atom content with an XML media type. (1486) by gaborbernat.
Keep inherited namespace bindings when serializing an XML subtree. (1487) by gaborbernat.
Decode base64 Atom content with a binary media type to bytes. (1488) by gaborbernat.
Order RSS 1.0 entries by the channel's RDF sequence when present. (1489) by gaborbernat.
Preserve explicit empty query and fragment markers when normalizing URLs. (1490) by gaborbernat.
Select Atom alternate links case-sensitively for feed and entry permalinks, and resolve empty href references against xml:base. (1491) by gaborbernat.
Resolve relative RDFa vocabularies and empty resource references against the document base with base_url. (1492) by gaborbernat.
Keep CSS rules in cascade order when their selectors can match the same element or a nested descendant. (1493) by gaborbernat.
Preserve valid CSS longhands when a later shorthand has an invalid value. (1495) by gaborbernat.
Inherit an Atom entry's author from its source or containing feed when the entry has no author. (1496) by gaborbernat.
Resolve an RSS 1.0 item's rdf:about against xml:base when populating its ID. (1497) by gaborbernat.
Preserve valid CSS longhands when another longhand cannot form a valid shorthand. (1499) by gaborbernat.
Expand RDFa CURIE prefixes without regard to case, including prefixes declared with @prefix. (1500) by gaborbernat.
Ignore longhand declarations that mix CSS-wide keywords with other value tokens, preserving earlier valid values. (1501) by gaborbernat.
Use Dublin Core dc:title as an RSS or RDF feed or item title when its core title is absent. (1502) by gaborbernat.
Preserve every rule in top-level CSS @starting-style blocks. (1503) by gaborbernat.
Prefer the first repeated Open Graph value, following the Open Graph protocol's array ordering. (1504) by gaborbernat.
Preserve case-sensitive aliases and every block in CSS @font-feature-values. (1505) by gaborbernat.
Ignore foreign XML namespaces on RSS 2.0 roots, channels, items, and core fields. (1506) by gaborbernat.
Resolve the full RDFa 1.1 initial-context prefixes and terms in RDFa items. (1507) by gaborbernat.
Decode escaped CSS-wide keywords in computed styles and reject declarations that mix them with other tokens. (1508) by gaborbernat.
Preserve case-sensitive CSS selector names in XML and namespace-qualified stylesheets. (1509) by gaborbernat.
Respect the feed's default namespace when inheriting an Atom author. (1510) by gaborbernat.
Preserve RGB channels in fully transparent hexadecimal CSS colors. (1511) by gaborbernat.
Ignore non-CSS <style> blocks when resolving computed styles, with case-sensitive type matching for SVG. (1512) by gaborbernat.
Match Atom element names case-sensitively in XML feeds. (1513) by gaborbernat.
Expand RDFa :reference CURIEs with the fixed default prefix, ignoring attempts to redefine it. (1514) by gaborbernat.
Keep fractional RGB percentages precise and handle large channels without invalid output. (1515) by gaborbernat.
Keep the streaming tokenizer memory check stable on free-threaded Python. (1516) by gaborbernat.
Expand RDFa CURIE and SafeCURIE values in about and resource attributes. (1517) by gaborbernat.
Keep CSS calculation units through multiplication by zero so angle and time declarations remain valid. (1518) by gaborbernat.
Require an RSS, Atom, or RDF feed to be the XML document root; keep embedded feed discovery for HTML. (1520) by gaborbernat.
Resolve RDFa CURIEs built from relative prefix IRIs against the document base. (1521) by gaborbernat.
Preserve signed zero inside nested CSS math expressions. (1522) by gaborbernat.
Require the Atom namespace on XML <feed> roots, including when no default namespace is declared. HTML feed discovery remains unchanged. (1524) by gaborbernat.
Preserve large HSL hues during CSS minification. (1525) by gaborbernat.
Require version="2.0" on XML RSS 2.0 roots. HTML feed discovery remains unchanged. Fold unitless zero in nested CSS math without dropping units from typed zero. (1526) by gaborbernat.
Preserve HSL colors with saturation above 100% when minifying CSS. (1527) by gaborbernat.
Match RSS 2.0 and RSS 1.0 element names case-sensitively in XML feeds. (1528) by gaborbernat.
Ignore malformed RDFa terms and bracketed SafeCURIEs in property and typeof. (1529) by gaborbernat.
Allow GCC 16 to build CSS path escaping with -Werror. (1494) by gaborbernat.
Allow the dev environment to resolve Sphinx and Docutils together. (1519) by gaborbernat.
Document the email address for private vulnerability reports. (#1390) by @gaborbernat.
<a name="release-1-15-1-fixed"></a>
<h1> and <h2> elements when exporting Markdown with setext headings. (#1288) by @gaborbernat.! before a Markdown link so CommonMark preserves the link instead of treating it as an image. (#1289) by @gaborbernat.reversed or value attributes cannot be represented in Markdown. (#1297) by @gaborbernat.colspan and rowspan in Markdown tables by serializing those tables as HTML. (#1299) by @gaborbernat.calc() when folding a negative value for a CSS property that clamps it at computed-value time. (#1303) by @gaborbernat.throw in JavaScript minification. (#1315) by @gaborbernat.outline declarations that use the retired invert color. (#1322) by @gaborbernat.gap, overflow, and overscroll-behavior values invalid. (#1323) by @gaborbernat.font declarations with repeated explicit weights from becoming active after minification. (#1325) by @gaborbernat.font values with excess pre-size options invalid during minification. (#1326) by @gaborbernat.localhost file URL hosts to empty. (#1335) by @gaborbernat.text-emphasis shorthands and defaults before var() substitutions. (#1341) by @gaborbernat.__html__ on values returned by __html__ in the MarkupSafe migration API. (#1342) by @gaborbernat.sanitize_node copies a node on free-threaded Python. (#1343) by @gaborbernat.suffix= in Markup.removesuffix in the MarkupSafe migration API. (#1345) by @gaborbernat.inset token. (#1346) by @gaborbernat.<a name="release-1-15-1-documentation"></a>
<a name="release-1-15-1-packaging"></a>
licenses/ directory. (#1378) by @gaborbernat.Close unclosed CSS blocks at EOF so repeated minification keeps the same output. (1285) by gaborbernat.
Keep CSS zero-length dimensions followed by negative numbers stable across repeated minification. (1286) by gaborbernat.
Preserve invalid CSS Unicode ranges so minification cannot turn them into valid font ranges. (1287) by gaborbernat.
Keep empty <h1> and <h2> elements when exporting Markdown with setext headings. (1288) by gaborbernat.
Escape a literal ! before a Markdown link so CommonMark preserves the link instead of treating it as an image. (1289) by gaborbernat.
Preserve zero-length units in CSS declarations when dropping them would change the value type or make an invalid declaration valid. (1290) by gaborbernat.
Preserve emphasis around nonbreaking and other Unicode spaces in Markdown output. (1291) by gaborbernat.
Preserve earlier CSS background longhands when a later shorthand has an invalid bare identifier. (1292) by gaborbernat.
Keep invalid font shorthand dimensions invalid during CSS minification. (1293) by gaborbernat.
Preserve hash tokens in CSS properties that do not accept colors. (1294) by gaborbernat.
Preserve invalid integer syntax in CSS order declarations during minification. (1295) by gaborbernat.
Preserve nested emphasis when adjacent closing delimiters would change the rendered Markdown. (1296) by gaborbernat.
Preserve ordered-list numbering when HTML reversed or value attributes cannot be represented in Markdown. (1297) by gaborbernat.
Preserve checked task-list items when serializing HTML to Markdown. (1298) by gaborbernat.
Preserve colspan and rowspan in Markdown tables by serializing those tables as HTML. (1299) by gaborbernat.
Drop element wrappers with invalid XML names while retaining their children during XML serialization. (1300) by gaborbernat.
Preserve CSS exponent and unit boundaries during minification. (1301) by gaborbernat.
Preserve numeric types when folding zero-valued CSS calc() expressions. (1302) by gaborbernat.
Keep calc() when folding a negative value for a CSS property that clamps it at computed-value time. (1303) by gaborbernat.
Keep valid CSS rules active when another rule with the same declarations has an invalid selector. (1304) by gaborbernat.
Preserve emphasis next to strikethrough when punctuation would change how Markdown delimiters bind. (1307) by gaborbernat.
Keep invalid background-position orders invalid during CSS minification. (1308) by gaborbernat.
Preserve paragraphs whose ordered-list markers cross inline element boundaries in Markdown output. (1309) by gaborbernat.
Preserve invalid border-color declarations with more than four values. (1310) by gaborbernat.
Percent-encode carets in URL paths. (1311) by gaborbernat.
Add root paths to hosted FTP and WebSocket URLs. (1312) by gaborbernat.
Preserve invalid border-color declarations containing commas or slashes. (1313) by gaborbernat.
Keep repeated CSS-wide keywords invalid in border-color declarations. (1314) by gaborbernat.
Reject a line break after throw in JavaScript minification. (1315) by gaborbernat.
Keep repeated CSS-wide keywords invalid in box shorthands. (1316) by gaborbernat.
Use the document fallback URL for data: and javascript: base elements. (1317) by gaborbernat.
Percent-encode usernames and passwords when normalizing URLs. (1318) by gaborbernat.
Keep apostrophes in non-special URL queries when normalizing URLs. (1319) by gaborbernat.
Collapse dot segments in hostless hierarchical URL paths. (1320) by gaborbernat.
Preserve hostless non-special URL paths without adding an empty authority. (1321) by gaborbernat.
Preserve invalid CSS outline declarations that use the retired invert color. (1322) by gaborbernat.
Keep overlong CSS gap, overflow, and overscroll-behavior values invalid. (1323) by gaborbernat.
Trim trailing C0 controls from URLs before normalization. (1324) by gaborbernat.
Keep invalid CSS font declarations with repeated explicit weights from becoming active after minification. (1325) by gaborbernat.
Keep invalid CSS font values with excess pre-size options invalid during minification. (1326) by gaborbernat.
Parse bracketed URL hosts correctly after userinfo. (1327) by gaborbernat.
Resolve percent-encoded dot segments in URL paths. (1328) by gaborbernat.
Preserve printable ASCII in opaque URL paths during normalization. (1329) by gaborbernat.
Preserve invalid zero dimensions in CSS flex bases, background positions, and shadows. (1330) by gaborbernat.
Preserve descending CSS Unicode ranges so invalid font descriptors stay ignored. (1331) by gaborbernat.
Canonicalize dotted IPv4 tails inside IPv6 URL hosts. (1332) by gaborbernat.
Preserve fractional and large CSS background-position offsets measured from an edge. (1333) by gaborbernat.
Preserve malformed CSS Unicode-range lists instead of activating ignored font descriptors. (1334) by gaborbernat.
Normalize localhost file URL hosts to empty. (1335) by gaborbernat.
Reject malformed IPv6 URL hosts. (1336) by gaborbernat.
Normalize Windows drive separators in file URL paths. (1337) by gaborbernat.
Preserve angle hue units and invalid dimensions in CSS color functions during minification. (1338) by gaborbernat.
Preserve invalid CSS text-decoration shorthands when removing initial values would make them valid. (1339) by gaborbernat.
Preserve in-scope namespace declarations and namespace URI attribute order when canonicalizing parsed XML. (1340) by gaborbernat.
Preserve invalid CSS text-emphasis shorthands and defaults before var() substitutions. (1341) by gaborbernat.
Honor __html__ on values returned by __html__ in the MarkupSafe migration API. (1342) by gaborbernat.
Keep the source tree stable while sanitize_node copies a node on free-threaded Python. (1343) by gaborbernat.
Preserve invalid border, outline, and column-rule shorthands that mix a CSS-wide keyword with another value. (1344) by gaborbernat.
Accept suffix= in Markup.removesuffix in the MarkupSafe migration API. (1345) by gaborbernat.
Preserve box shadows whose length values are split by a color or inset token. (1346) by gaborbernat.
Restore base URL resolution speed after URL normalization changes. (1347) by gaborbernat.
Trim trailing C0 controls and spaces before normalizing URLs. (1348) by gaborbernat.
Normalize backslashes as path separators for special-scheme URLs. (1349) by gaborbernat.
Keep text-decoration line keywords separated by default styles or colors so invalid values stay invalid. (1350) by gaborbernat.
Reject invalid XML characters in doctype markup and literals. (1351) by gaborbernat.
Preserve border, outline, and column-rule shorthands with duplicate style values. (1352) by gaborbernat.
Preserve repeated substitution functions in the border-color shorthand. (1353) by gaborbernat.
Remove dangling ampersands when cleaning empty URL queries. (1354) by gaborbernat.
Preserve CSS drop-shadow offsets during minification. (1355) by gaborbernat.
Preserve empty URL authorities during normalization. (1356) by gaborbernat.
Keep Windows drive roots when normalizing file URLs. (1357) by gaborbernat.
Preserve IDNA sigma mapping in URL hosts. (1358) by gaborbernat.
Reject URL credentials when no host is present. (1359) by gaborbernat.
Preserve letter case and percent-encode non-ASCII characters in opaque URL hosts. (1360) by gaborbernat.
Treat Windows drive letters in file URL authorities as paths. (1361) by gaborbernat.
Preserve non-ASCII port text when normalizing URLs. (1362) by gaborbernat.
Keep the root slash when trimming URL paths. (1363) by gaborbernat.
Accept long zero-padded URL ports within the valid numeric range. (1364) by gaborbernat.
Reject userinfo in file URL authorities. (1365) by gaborbernat.
Encode query-shaped URL fragments with the URL Standard fragment percent-encode set. (1367) by gaborbernat.
Preserve long CSS percentage offsets during minification. (1369) by gaborbernat.
Preserve long RGB channel values during CSS minification. (1370) by gaborbernat.
Keep malformed RGB comma syntax invalid during CSS minification. (1371) by gaborbernat.
Keep mixed legacy RGB syntax invalid during CSS minification. (1372) by gaborbernat.
Keep font shorthands with misplaced CSS-wide keywords invalid during minification. (1374) by gaborbernat.
Keep malformed font line-height values invalid during CSS minification. (1375) by gaborbernat.
Preserve quoted font-family boundaries during CSS minification. (1376) by gaborbernat.
Preserve nonbreaking and other Unicode spaces at Markdown prose edges. (1377) by gaborbernat.
Keep duplicate background attachments invalid during CSS minification. (1380) by gaborbernat.
Preserve leading U+FEFF characters in Markdown exports for CommonMark readers. (1382) by gaborbernat.
Keep invalid background size keywords after a position slash from becoming valid lengths. (1383) by gaborbernat.
Keep content inside a heading when a nested MathML or SVG element blocks its end tag. (1385) by gaborbernat.
Preserve Unicode whitespace in base URLs. (1386) by gaborbernat.
Keep whitespace in active formatting when table content moves outside the table. (1387) by gaborbernat.
Keep empty nested list items when their only content is a trailing line break. (1388) by gaborbernat.
Preserve spaces in opaque base URL paths. (1389) by gaborbernat.
Keep invalid zero-unit RGB channels invalid when minifying CSS. (1392) by gaborbernat.
Keep malformed background values stable across repeated CSS minification. (1393) by gaborbernat.
Preserve line breaks inside emphasized Markdown that needs HTML tags. (1394) by gaborbernat.
Document the email address for private vulnerability reports. (1390) by gaborbernat.
Ship third-party license notices in the licenses/ directory. (1378) by gaborbernat.
Add turbohtml.etree views for extraction code that uses ElementTree text, tail, mutation and XPath operations. The C adapter shares native DOM nodes a
<a name="release-1-15-0-added"></a>
turbohtml.etree views for extraction code that uses ElementTree text, tail, mutation and XPath operations. The C adapter shares native DOM nodes and supports copying across lxml API boundaries. (#1284) by @gaborbernat.<a name="release-1-15-0-fixed"></a>
white-space modes in Markdown output, including inherited modes on selected subtrees. Use preformatted blocks for preserved spacing and embedded <pre> HTML inside table cells, headings and links. (#1283) by @gaborbernat.Add turbohtml.etree views for extraction code that uses ElementTree text, tail, mutation and XPath operations. The C adapter shares native DOM nodes and supports copying across lxml API boundaries. (1284) by gaborbernat.
Preserve inline CSS white-space modes in Markdown output, including inherited modes on selected subtrees. Use preformatted blocks for preserved spacing and embedded <pre> HTML inside table cells, headings and links. (1283) by gaborbernat.
Retain Markdown fence languages across class ordering and whitespace around ; recognize language-* classes on . (#1281) by @gaborbernat.
<a name="release-1-14-1-fixed"></a>
<code>; recognize language-* classes on <pre>. (#1281) by @gaborbernat.re:test() and matches() filters with many alternatives or repeated patterns. (#1282) by @gaborbernat.Retain Markdown fence languages across class ordering and whitespace around <code>; recognize language-* classes on <pre>. (1281) by gaborbernat.
Speed up XPath re:test() and matches() filters with many alternatives or repeated patterns. (1282) by gaborbernat.
The standalone IDNA fuzz target checks URL and Unicode normalization invariants. (#1010) by @gaborbernat.
<a name="release-1-14-0-added"></a>
minify_js shortens empty static blocks, new X(), async ()=> and nested if/else. (#1111) by @gaborbernat.minify_js drops non-directive constant statements and prints an empty loop body as ;. (#1113) by @gaborbernat.minify_css drops the space next to a string in an at-rule prelude. (#1134) by @gaborbernat.RelaxNG reads include and externalRef files resolved against the new base_url argument, confined to include_root when set. (#1218) by @gaborbernat.<a name="release-1-14-0-fixed"></a>
<script> buffer when a member access ends with an empty name, such as t.0.. (#949) by @gaborbernat.iter_elements safe when set_text, the text setter, field_value, or set_inner_html replaces the iterated children, instead of crashing. Return None from first_child and last_child when a NodeFilter detaches the walked node, instead of crashing. (#950) by @gaborbernat.RELAX NG <ref> with no name, a reference cycle that never crosses an element, and an interleave whose branches share an element name or both match text when the schema compiles, and validate an ambiguous choice in bounded memory, instead of crashing, hanging, or exhausting memory. (#951) by @gaborbernat.{--x:} no longer crashes the process. Minifying CSS with many same-selector rules no longer costs time and memory quadratic in the rule count; a repeat merges only with a rule at most 256 back. (#952) by @gaborbernat.RecursionError on a deeper source document. (#953) by @gaborbernat.parse_xml. (#955) by @gaborbernat.XMLSchema that references an undeclared component, forms a group, attribute-group, or type-derivation cycle or a reference chain over 100 hops, or declares an xs:unique, xs:key, or xs:keyref identity constraint, instead of crashing or validating the document against an incomplete schema. (#956) by @gaborbernat.ValueError for an EXSLT str:padding length above 100,000 characters. (#957) by @gaborbernat.{ in a scrubbed <style> body, such as color:expression(...) or -moz-binding:url(...). (#958) by @gaborbernat.normalize_url, clean_url, extract_links, resolve_links, and the sanitizer's media_hosts allowlist: a special-scheme authority ends at a backslash, an IPv4 address is read in all four notations and emitted dotted-decimal, the host is percent-decoded, and an IPv6 literal is zero-compressed. (#960) by @gaborbernat.EncodingMatch.codec with U+FFFD replacement instead of raising UnicodeDecodeError on malformed bytes. (#961) by @gaborbernat.RecursionError from Document.json_ld and Document.structured_data. (#962) by @gaborbernat.serialize(Html(xml=True)) emit well-formed XML, dropping the characters, attribute names, and comment spellings XML 1.0 forbids. (#963) by @gaborbernat.detect reports UTF-16LE for the FF FE 00 00 byte-order mark, matching parse, instead of the UTF-32LE label the parser does not produce. (#964) by @gaborbernat.xsl:import hrefs that resolve to a UNC path (\\host\share or file:////host/share). (#965) by @gaborbernat.normalize_url, clean_url, and extract_links no longer take time quadratic in the length of a non-ASCII host, leave a host longer than 16384 code points unencoded, and keep a host carrying a code point UTS #46 disallows as Unicode rather than converting it to punycode. (#966) by @gaborbernat.c:d[;e] whose ; does not end it. (#972) by @gaborbernat.sanitize drops a URL such as ftp\u00a0://host when allow_relative_urls is off, as the URL is relative. (#974) by @gaborbernat.parse_xml. (#979) by @gaborbernat.minify_js rejects two statements on one line with no separator. (#984) by @gaborbernat.xmlns:p="", in parse_xml. (#989) by @gaborbernat.ValueError for a function or class declaration without a name and for a string or template that ends in a backslash. (#990) by @gaborbernat.<script>, <style> and the other raw-text elements as markup. (#994) by @gaborbernat.inner_html of a frame with children added through the DOM now returns an empty string. (#996) by @gaborbernat.<script>, <style> and the other raw-text elements unescaped in inner_html and serialize(inner=True). (#999) by @gaborbernat.minify_js keeps an async function expression's name and *. (#1000) by @gaborbernat.sanitize HTML output re-parse to the tree the policy judged. (#1002) by @gaborbernat.minify_js keeps the parentheses V8 needs around a destructuring argument. (#1003) by @gaborbernat.minify_js no longer changes what a script does. (#1004) by @gaborbernat.\( or url(). (#1006) by @gaborbernat.var over a catch parameter. (#1007) by @gaborbernat.minify_js accepts more valid scripts, such as await identifiers and class static blocks. (#1029) by @gaborbernat.minify_js rejects let as a lexical binding name and duplicate unique parameters. (#1030) by @gaborbernat.to_markdown keeps emphasis, strikethrough and code intact when read back. (#1032) by @gaborbernat.minify_css no longer turns an invalid rgb() shape into a valid color. (#1033) by @gaborbernat.minify_css keeps spaces that a selector or value needs. (#1034) by @gaborbernat.minify_js no longer drops a declaration whose binding is still read. (#1035) by @gaborbernat.selectedcontent nested in an option or another selectedcontent stays empty instead of exhausting memory. (#1044) by @gaborbernat.to_markdown and the other text renderers handle any tree depth without RecursionError. (#1046) by @gaborbernat.to_markdown and the other text renderers keep rows under nested row groups. (#1047) by @gaborbernat.url(. (#1048) by @gaborbernat.minify_css drops a declaration or rule holding a string a newline cuts short. (#1051) by @gaborbernat.minify_css no longer joins two idents in a property name. (#1052) by @gaborbernat.option elements is no longer quadratic, and nested options stay out of selectedcontent. (#1057) by @gaborbernat.minify_css drops a rule whose selector holds a stray ; or }. (#1059) by @gaborbernat.minify_css closes a ( or [ left open at the end of input. (#1060) by @gaborbernat.minify_css no longer trims the space of a backslash-space escape. (#1061) by @gaborbernat.minify_css drops a rule with an empty selector. (#1062) by @gaborbernat.minify_css no longer merges a number into the next token in at-rules and calc(). (#1063) by @gaborbernat.minify_css no longer leaves some value and selector rewrites for a second call. (#1064) by @gaborbernat.minify_css merges rules from combined same-query @media blocks in one call. (#1065) by @gaborbernat.to_markdown drops a <br> at the end of a block instead of leaving a blank line. (#1068) by @gaborbernat.to_markdown renders a <br> inside a heading as a space. (#1069) by @gaborbernat.to_markdown escapes a backtick in an image's alt text. (#1072) by @gaborbernat.to_markdown keeps the block after an empty list item or block quote outside the container. (#1073) by @gaborbernat.to_markdown keeps a list nested when a non-li element wraps it inside a list item. (#1074) by @gaborbernat.minify_css no longer turns a unit starting with e into an exponent. (#1077) by @gaborbernat.to_markdown and to_text cap list and quote indentation at 20 levels. (#1079) by @gaborbernat.~, :has(~ ...), :has(+ ...) or chained descendant combinators match in linear time. (#1081) by @gaborbernat.url() with a modifier in @import and @namespace. (#1082) by @gaborbernat.minify_css keeps the case of an escaped custom property name. (#1083) by @gaborbernat.minify_js reads a leading let with no binding after it as an identifier. (#1084) by @gaborbernat.xpath accepts or, and, div and mod after a * name test. (#1085) by @gaborbernat.css_to_xpath makes [att="" i] match only elements carrying the attribute. (#1086) by @gaborbernat.parse_xml accepts an empty comment before the root element. (#1087) by @gaborbernat.serialize(Html(xml=True)) now reads back unchanged with parse_xml. (#1088) by @gaborbernat.source_locations=True no longer reports an end tag the source never wrote. (#1089) by @gaborbernat.head and body inside SVG or MathML content. (#1090) by @gaborbernat.pre in a template table row no longer gains a line feed per round trip. (#1091) by @gaborbernat.</body> and </html> when the body element is out of scope. (#1092) by @gaborbernat.<selectedcontent> mirrors the option the spec selects. (#1093) by @gaborbernat.minify_js flattens all nested blocks in one call. (#1094) by @gaborbernat.minify_js rejects declarations in single-statement bodies and invalid binding patterns. (#1108) by @gaborbernat.css_to_xpath makes [att|="" i] match only elements carrying the attribute. (#1109) by @gaborbernat.minify_css ends a stylesheet's final statement at-rule with ;. (#1110) by @gaborbernat.minify_css keeps {} blocks in custom property values. (#1114) by @gaborbernat.Element rejects children for frame, like the other elements serialized without them. (#1118) by @gaborbernat.<selectedcontent> mirrors the selected option when written after it or past a <datalist> option. (#1119) by @gaborbernat.to_markdown output reads back in full with markdown-it's CommonMark preset. (#1121) by @gaborbernat.minify_js no longer crashes on a long statement list. (#1126) by @gaborbernat.minify_js rejects more invalid declarations, catch parameters and binding names. (#1127) by @gaborbernat.minify_css merges same-query @media blocks separated by a rule it drops. (#1128) by @gaborbernat.~ run faster on long runs of sibling elements. (#1141) by @gaborbernat.to_markdown writes an empty <blockquote> as > and an empty <pre> as a fence without a blank line. (#1209) by @gaborbernat.to_markdown writes a leading <br> and each <br> of a consecutive run as a hard line break. (#1210) by @gaborbernat.to_markdown keeps a link with an empty href and writes an empty link or image destination as <>. (#1212) by @gaborbernat.to_markdown writes a line break inside inline code as a space so the next line cannot open a block. (#1213) by @gaborbernat.to_markdown keeps block content inside a heading on the heading line and reads a block edge in link text or a heading as a space. (#1214) by @gaborbernat.to_markdown closes and reopens emphasis around a block inside it and starts a new paragraph for inline content after that block. (#1215) by @gaborbernat.to_markdown separates a list item's text from a paragraph or block before it with a blank line. (#1216) by @gaborbernat.to_markdown converts. (#1221) by @gaborbernat.Element.css_path no longer hangs on a detached element whose id the document lacks, a node filter that steps its own traverser raises instead of corrupting the outer step, and MutationObserver.observe, TreeWalker, NodeIterator, append and extend keep a node and its tree together when a callback or another thread moves it. (#1222) by @gaborbernat.css_path no longer anchors a detached element on an attached element's id. (#1227) by @gaborbernat.NodeIterator now follows removals made by normalize(), Range methods and query edits. (#1228) by @gaborbernat.Range and StaticRange now read a moving container together with its tree. (#1230) by @gaborbernat.Range methods now read a moving node argument together with its tree. (#1231) by @gaborbernat.MemoryError when a CSS selector query fails to allocate memory. (#1233) by @gaborbernat.to_markdown drops tabs and line breaks from link and image destinations. (#1237) by @gaborbernat.to_markdown keeps the spaces at both ends of inline code. (#1238) by @gaborbernat.to_markdown applies emphasis around a table to every cell. (#1241) by @gaborbernat.to_markdown keeps a <br> and a block edge inside <pre> as line breaks of the code block. (#1245) by @gaborbernat.StyleSheet and StyleDeclaration keep {} blocks in custom property values. (#1246) by @gaborbernat.StyleSheet and StyleDeclaration read a backslash-escaped delimiter as part of a name. (#1246) by @gaborbernat.MemoryError when to_markdown fails to allocate memory inside a table cell, a nested list or quote, or a converter. (#1247) by @gaborbernat.<...> form, the only form CommonMark reads it in. (#1248) by @gaborbernat.to_markdown closes emphasis before a block quote inside it and reopens it in the quote. (#1249) by @gaborbernat.<title>, <datalist>, <noembed>, <noframes> and <rp> in to_markdown and to_text, which browsers do not render. (#1251) by @gaborbernat.MemoryError when parsing or rewriting HTML fails to allocate memory. (#1252) by @gaborbernat.extend no longer links a node twice when another thread links its imported copy first. (#1254) by @gaborbernat.StyleSheet and StyleDeclaration no longer read an escaped slash as the start of a comment. (#1255) by @gaborbernat.to_markdown escapes a & that starts a character reference finished by the next text node. (#1256) by @gaborbernat.to_markdown escapes emphasis, tag, reference and line-break characters in image alt text. (#1258) by @gaborbernat.to_markdown writes line breaks in link and image titles as character references and escapes a & that starts one. (#1259) by @gaborbernat.<template> content in to_markdown and to_text, which browsers do not render. (#1260) by @gaborbernat.to_markdown leaves out a table row that has no cells. (#1261) by @gaborbernat.MemoryError when building, copying or sanitizing elements fails to allocate memory. (#1262) by @gaborbernat.to_markdown keeps a list separate from one before it when only an empty block stands between them. (#1263) by @gaborbernat.to_markdown writes emphasis as an HTML tag where its delimiters would merge or could not open or close. (#1264) by @gaborbernat.xsl:number now inserts the string value of a value that is NaN, infinite or below 0.5, and formats a value of 2^63 or more as its exact integer. (#1265) by @gaborbernat.to_markdown places a nested list or an item's first block on its own line where CommonMark reads it back. (#1266) by @gaborbernat.to_markdown drops a <br> that nothing visible follows and keeps one after an inner block in the next block. (#1267) by @gaborbernat.to_markdown flattens a block inside a table cell and writes a <pre> on a single line as a code span. (#1268) by @gaborbernat.to_markdown makes a list item loose when it holds two paragraphs or text after a nested block. (#1269) by @gaborbernat.Linker.linkify and Linker.linkify_node raise MemoryError when an allocation fails, instead of SystemError. (#1273) by @gaborbernat.The standalone IDNA fuzz target checks URL and Unicode normalization invariants. (1010) by gaborbernat.
Add bounded HTML grammar generation and export materialized production sweeps for corpus seeding. (1018) by gaborbernat.
Reduce saved HTML, CSS and JavaScript findings with language-aware deletion. (1019) by gaborbernat.
~turbohtml.clean.minify_js shortens empty static blocks, new X(), async ()=> and nested if/else. (1111) by gaborbernat.
CSS minification shortens escaped names and preserves their token boundaries. (1112) by gaborbernat.
~turbohtml.clean.minify_js drops non-directive constant statements and prints an empty loop body as ;. (1113) by gaborbernat.
~turbohtml.clean.minify_css drops the space next to a string in an at-rule prelude. (1134) by gaborbernat.
Detect URL output changes and rejection during invariant fuzzing. (1145) by gaborbernat.
Add encoding stream and decoded-text invariants to the fuzz oracles. (1152) by gaborbernat.
Add a bounded public URL-host oracle for Unicode mappings, NFC and canonical Punycode. (1155) by gaborbernat.
Add fixed-target and repeated link-resolution checks to the fuzz oracles. (1159) by gaborbernat.
Add fixed text and encoding checks for streaming byte parsing. (1160) by gaborbernat.
Add bounded DOM sequence and observer callback invariant checks. (1162) by gaborbernat.
Add bounded iterator edit-sequence invariant checks. (1164) by gaborbernat.
Add bounded custom-property grammar generation with independent payload checks. (1167) by gaborbernat.
Add bounded HTML grammar generation with literal sibling-tree checks. (1168) by gaborbernat.
Add bounded XML generation with literal names and decoded whitespace expectations. (1170) by gaborbernat.
Add bounded XML generation with literal comment and CDATA expectations. (1172) by gaborbernat.
Fuzz canonical-equivalent IDNA hosts against independent normalized URL targets. (1176) by gaborbernat.
Generate SVG integration trees with independent namespace and parent expectations. (1177) by gaborbernat.
Share IDNA conversion between URL normalization and the standalone harness. (1179) by gaborbernat.
Extend encoding fuzz fixtures with BOM and conflicting declarations. (1180) by gaborbernat.
Extend encoding fuzz fixtures with both content-type declaration attribute orders. (1181) by gaborbernat.
Add encoding fuzz fixtures for UTF-16 declarations that HTML maps to UTF-8. (1183) by gaborbernat.
Generate finite nested lists with independent expectations for each item's parent. (1184) by gaborbernat.
Generate finite tables with independent row group and cell parent expectations. (1185) by gaborbernat.
Add encoding fuzz fixtures for labels that decode as windows-1252. (1186) by gaborbernat.
Expand HTML corpus generation with pinned Domato tag, attribute and value alternatives, document-only tag profiles, and formatting and SVG integration shapes. (1192) by gaborbernat.
Check URL split/recomposition and reparse invariants through public normalization. (1193) by gaborbernat.
Add bounded XML structure generation with materialized corpus bytes and separate node and expansion budgets. (1196) by gaborbernat.
Compare inline XSLT and schema outcomes with libxml2 and libxslt, including repaired seed-tree mutations. (1198) by gaborbernat.
Add bounded CSS structure generation from pinned Domato and Blink tables, with distinct variable/keyframe bindings and independent AST budget checks. (1201) by gaborbernat.
Add bounded DOM byte programs with independent state and register-order checks. (1203) by gaborbernat.
Add bounded Markdown source and HTML grammars with independent first-conversion checks and materialized corpus bytes. (1204) by gaborbernat.
Add bounded encoded corpus generation with explicit codec expectations. (1205) by gaborbernat.
Admit generated XML, CSS, Markdown and encoding bytes through public fuzz consumers, and seed coverage-guided CI from their generation contexts. (1207) by gaborbernat.
Add a fuzz-only C build mode that poisons arena gaps and parked wrappers and checks its sanitizer at startup. (1217) by gaborbernat.
~turbohtml.validate.RelaxNG reads include and externalRef files resolved against the new base_url argument, confined to include_root when set. (1218) by gaborbernat.
Fuzz retained wrappers, nested callbacks, parser reentry, hostile argument conversions and garbage collection with byte programs that a native tree verifier checks after every step. (1223) by gaborbernat.
Run the IDNA, phone, JavaScript and CSS standalone fuzz harnesses under MemorySanitizer, and the DOM lifecycle programs in parallel threads under ThreadSanitizer. (1244) by gaborbernat.
Add an allocation-failure sweep that fails each PyMem allocation of the fuzz seeds in turn and expects MemoryError. (1277) by gaborbernat.
The JavaScript minifier no longer reads past the inline-<script> buffer when a member access ends with an empty name, such as t.0.. (949) by gaborbernat.
Keep ~turbohtml.Node.iter_elements safe when set_text, the text setter, field_value, or ~turbohtml.ShadowRoot.set_inner_html replaces the iterated children, instead of crashing. Return None from ~turbohtml.TreeWalker.first_child and ~turbohtml.TreeWalker.last_child when a NodeFilter detaches the walked node, instead of crashing. (950) by gaborbernat.
Reject a RELAX NG <ref> with no name, a reference cycle that never crosses an element, and an interleave whose branches share an element name or both match text when the schema compiles, and validate an ambiguous choice in bounded memory, instead of crashing, hanging, or exhausting memory. (951) by gaborbernat.
Minifying CSS that contains a selector-less rule such as {--x:} no longer crashes the process. Minifying CSS with many same-selector rules no longer costs time and memory quadratic in the rule count; a repeat merges only with a rule at most 256 back. (952) by gaborbernat.
Count the XSLT built-in template rules against the 400-level nesting limit, raising RecursionError on a deeper source document. (953) by gaborbernat.
Parsing HTML with formatting elements nested past the 512 open-element limit no longer builds a quadratic number of DOM nodes. (954) by gaborbernat.
Detect duplicate attributes while parsing XML in time linear in the attribute count; an element with many attributes in one namespace, or a repeated attribute name, no longer stalls turbohtml.parse_xml. (955) by gaborbernat.
Reject an XSD ~turbohtml.validate.XMLSchema that references an undeclared component, forms a group, attribute-group, or type-derivation cycle or a reference chain over 100 hops, or declares an xs:unique, xs:key, or xs:keyref identity constraint, instead of crashing or validating the document against an incomplete schema. (956) by gaborbernat.
Raise ValueError for an EXSLT str:padding length above 100,000 characters. (957) by gaborbernat.
Drop a disallowed CSS declaration written before { in a scrubbed <style> body, such as color:expression(...) or -moz-binding:url(...). (958) by gaborbernat.
Attribute URL hosts the way a browser resolves them in normalize_url, clean_url, extract_links, resolve_links, and the sanitizer's media_hosts allowlist: a special-scheme authority ends at a backslash, an IPv4 address is read in all four notations and emitted dotted-decimal, the host is percent-decoded, and an IPv6 literal is zero-compressed. (960) by gaborbernat.
Decode byte-order-mark input through EncodingMatch.codec with U+FFFD replacement instead of raising UnicodeDecodeError on malformed bytes. (961) by gaborbernat.
Skip a JSON-LD block that nests arrays or objects more than 400 levels deep instead of raising RecursionError from Document.json_ld and Document.structured_data. (962) by gaborbernat.
Make serialize(Html(xml=True)) emit well-formed XML, dropping the characters, attribute names, and comment spellings XML 1.0 forbids. (963) by gaborbernat.
turbohtml.detect.detect reports UTF-16LE for the FF FE 00 00 byte-order mark, matching turbohtml.parse, instead of the UTF-32LE label the parser does not produce. (964) by gaborbernat.
Reject xsl:import hrefs that resolve to a UNC path (\\host\share or file:////host/share). (965) by gaborbernat.
The URL extraction helpers ~turbohtml.extract.normalize_url, ~turbohtml.extract.clean_url, and ~turbohtml.extract.extract_links no longer take time quadratic in the length of a non-ASCII host, leave a host longer than 16384 code points unencoded, and keep a host carrying a code point UTS #46 disallows as Unicode rather than converting it to punycode. (966) by gaborbernat.
The CSS minifier no longer crashes, or merges a rule past another that sets the same property, on a declaration such as c:d[;e] whose ; does not end it. (972) by gaborbernat.
sanitize drops a URL such as ftp\u00a0://host when allow_relative_urls is off, as the URL is relative. (974) by gaborbernat.
Fix undefined behavior that sanitizer builds report on empty attribute values, text nodes, and namespace names. (977) by gaborbernat.
An XML document with many namespace prefix declarations in scope no longer stalls turbohtml.parse_xml. (979) by gaborbernat.
~turbohtml.clean.minify_js rejects two statements on one line with no separator. (984) by gaborbernat.
The JavaScript minifier no longer crashes on a function declaration that shares a parameter's name. (986) by gaborbernat.
Reject a prefixed namespace declaration with an empty value, such as xmlns:p="", in turbohtml.parse_xml. (989) by gaborbernat.
The JavaScript minifier now raises ValueError for a function or class declaration without a name and for a string or template that ends in a backslash. (990) by gaborbernat.
The JavaScript minifier no longer revisits code it already removed. (992) by gaborbernat.
Serialize element and comment children of <script>, <style> and the other raw-text elements as markup. (994) by gaborbernat.
inner_html of a frame with children added through the DOM now returns an empty string. (996) by gaborbernat.
Write the text and CDATA children of <script>, <style> and the other raw-text elements unescaped in inner_html and serialize(inner=True). (999) by gaborbernat.
~turbohtml.clean.minify_js keeps an async function expression's name and *. (1000) by gaborbernat.
The JavaScript minifier no longer folds a variable that a block-level function reassigns. (1001) by gaborbernat.
Make turbohtml.clean.sanitize HTML output re-parse to the tree the policy judged. (1002) by gaborbernat.
~turbohtml.clean.minify_js keeps the parentheses V8 needs around a destructuring argument. (1003) by gaborbernat.
Folding in ~turbohtml.clean.minify_js no longer changes what a script does. (1004) by gaborbernat.
The CSS minifier no longer merges rules past an override hidden behind \( or url(). (1006) by gaborbernat.
The JavaScript minifier no longer shadows a used outer binding or drops a var over a catch parameter. (1007) by gaborbernat.
Run independent JavaScript invariants on exact public fuzz inputs. (1014) by gaborbernat.
A trailing backslash no longer escapes the closer the CSS minifier adds at end of input. (1022) by gaborbernat.
The CSS minifier no longer merges rules past an override with an escaped property name. (1023) by gaborbernat.
~turbohtml.clean.minify_js accepts more valid scripts, such as await identifiers and class static blocks. (1029) by gaborbernat.
~turbohtml.clean.minify_js rejects let as a lexical binding name and duplicate unique parameters. (1030) by gaborbernat.
~turbohtml.Node.to_markdown keeps emphasis, strikethrough and code intact when read back. (1032) by gaborbernat.
~turbohtml.clean.minify_css no longer turns an invalid rgb() shape into a valid color. (1033) by gaborbernat.
~turbohtml.clean.minify_css keeps spaces that a selector or value needs. (1034) by gaborbernat.
~turbohtml.clean.minify_js no longer drops a declaration whose binding is still read. (1035) by gaborbernat.
A selectedcontent nested in an option or another selectedcontent stays empty instead of exhausting memory. (1044) by gaborbernat.
~turbohtml.Node.to_markdown and the other text renderers handle any tree depth without RecursionError. (1046) by gaborbernat.
~turbohtml.Node.to_markdown and the other text renderers keep rows under nested row groups. (1047) by gaborbernat.
The CSS minifier no longer closes the input inside an unterminated string or url(. (1048) by gaborbernat.
The CSS minifier keeps the space that ends a hex escape in a property name. (1049) by gaborbernat.
The CSS minifier no longer splits a dimension whose unit has digits, escapes or non-ASCII. (1050) by gaborbernat.
~turbohtml.clean.minify_css drops a declaration or rule holding a string a newline cuts short. (1051) by gaborbernat.
~turbohtml.clean.minify_css no longer joins two idents in a property name. (1052) by gaborbernat.
Parsing many selected option elements is no longer quadratic, and nested options stay out of selectedcontent. (1057) by gaborbernat.
XSLT transform cost no longer depends on where nodes sit in memory. (1058) by gaborbernat.
~turbohtml.clean.minify_css drops a rule whose selector holds a stray ; or }. (1059) by gaborbernat.
~turbohtml.clean.minify_css closes a ( or [ left open at the end of input. (1060) by gaborbernat.
~turbohtml.clean.minify_css no longer trims the space of a backslash-space escape. (1061) by gaborbernat.
~turbohtml.clean.minify_css drops a rule with an empty selector. (1062) by gaborbernat.
~turbohtml.clean.minify_css no longer merges a number into the next token in at-rules and calc(). (1063) by gaborbernat.
~turbohtml.clean.minify_css no longer leaves some value and selector rewrites for a second call. (1064) by gaborbernat.
~turbohtml.clean.minify_css merges rules from combined same-query @media blocks in one call. (1065) by gaborbernat.
~turbohtml.Node.to_markdown drops a <br> at the end of a block instead of leaving a blank line. (1068) by gaborbernat.
~turbohtml.Node.to_markdown renders a <br> inside a heading as a space. (1069) by gaborbernat.
~turbohtml.Node.to_markdown escapes a backtick in an image's alt text. (1072) by gaborbernat.
~turbohtml.Node.to_markdown keeps the block after an empty list item or block quote outside the container. (1073) by gaborbernat.
~turbohtml.Node.to_markdown keeps a list nested when a non-li element wraps it inside a list item. (1074) by gaborbernat.
~turbohtml.clean.minify_css no longer turns a unit starting with e into an exponent. (1077) by gaborbernat.
~turbohtml.Node.to_markdown and ~turbohtml.Node.to_text cap list and quote indentation at 20 levels. (1079) by gaborbernat.
Selectors with ~, :has(~ ...), :has(+ ...) or chained descendant combinators match in linear time. (1081) by gaborbernat.
The CSS minifier keeps url() with a modifier in @import and @namespace. (1082) by gaborbernat.
~turbohtml.clean.minify_css keeps the case of an escaped custom property name. (1083) by gaborbernat.
~turbohtml.clean.minify_js reads a leading let with no binding after it as an identifier. (1084) by gaborbernat.
~turbohtml.Node.xpath accepts or, and, div and mod after a * name test. (1085) by gaborbernat.
~turbohtml.convert.css_to_xpath makes [att="" i] match only elements carrying the attribute. (1086) by gaborbernat.
~turbohtml.parse_xml accepts an empty comment before the root element. (1087) by gaborbernat.
XML output from serialize(Html(xml=True)) now reads back unchanged with parse_xml. (1088) by gaborbernat.
source_locations=True no longer reports an end tag the source never wrote. (1089) by gaborbernat.
The parser no longer builds head and body inside SVG or MathML content. (1090) by gaborbernat.
A pre in a template table row no longer gains a line feed per round trip. (1091) by gaborbernat.
The parser ignores </body> and </html> when the body element is out of scope. (1092) by gaborbernat.
<selectedcontent> mirrors the option the spec selects. (1093) by gaborbernat.
~turbohtml.clean.minify_js flattens all nested blocks in one call. (1094) by gaborbernat.
The sanitizer keeps escaped table sections and rows in source order. (1095) by gaborbernat.
~turbohtml.clean.minify_js rejects declarations in single-statement bodies and invalid binding patterns. (1108) by gaborbernat.
~turbohtml.convert.css_to_xpath makes [att|="" i] match only elements carrying the attribute. (1109) by gaborbernat.
~turbohtml.clean.minify_css ends a stylesheet's final statement at-rule with ;. (1110) by gaborbernat.
~turbohtml.clean.minify_css keeps {} blocks in custom property values. (1114) by gaborbernat.
~turbohtml.Element rejects children for frame, like the other elements serialized without them. (1118) by gaborbernat.
<selectedcontent> mirrors the selected option when written after it or past a <datalist> option. (1119) by gaborbernat.
Deeply nested ~turbohtml.Node.to_markdown output reads back in full with markdown-it's CommonMark preset. (1121) by gaborbernat.
~turbohtml.clean.minify_js no longer crashes on a long statement list. (1126) by gaborbernat.
~turbohtml.clean.minify_js rejects more invalid declarations, catch parameters and binding names. (1127) by gaborbernat.
~turbohtml.clean.minify_css merges same-query @media blocks separated by a rule it drops. (1128) by gaborbernat.
Selectors using ~ run faster on long runs of sibling elements. (1141) by gaborbernat.
Preserve valid CSS declarations beside empty values and invalid box edges. (1143) by gaborbernat.
Preserve quoted attribute names and misplaced universal selectors during CSS minification. (1144) by gaborbernat.
Preserve invalid top-level delimiters in background-position values during CSS minification. (1146) by gaborbernat.
Preserve invalid whitespace around operators in CSS math functions. (1147) by gaborbernat.
Preserve trailing decimal points in CSS numeric declarations. (1148) by gaborbernat.
Reject cleaned URLs whose canonical authority loses its web-host shape. (1149) by gaborbernat.
Preserve numeric token types and fractional math wrappers in z-index values. (1151) by gaborbernat.
Preserve quoted position components in malformed background-position declarations. (1154) by gaborbernat.
RELAX NG rejects schemas whose root uses a foreign namespace. (1156) by gaborbernat.
Treat RELAX NG values without an explicit type as tokens. (1161) by gaborbernat.
Preserve separators between stray CSS text and following nested rules. (1163) by gaborbernat.
Enforce RELAX NG data-pattern exclusions. (1165) by gaborbernat.
Keep invalid background size and repeat pairs invalid. (1166) by gaborbernat.
Keep trailing auto after unresolved background size functions. (1169) by gaborbernat.
Accept empty element content for RELAX NG empty string patterns. (1171) by gaborbernat.
Keep repeated box shorthand components when functions remain unresolved. (1173) by gaborbernat.
Enforce numeric range bounds in RELAX NG datatype validation. (1174) by gaborbernat.
Normalize literal file URL path backslashes and empty root paths. (1175) by gaborbernat.
Preserve namespace constraints when minifying universal selectors inside functions. (1178) by gaborbernat.
Preserve background-position values that contain unresolved functions. (1182) by gaborbernat.
Preserve font shorthand components around unresolved functions during CSS minification. (1187) by gaborbernat.
Reject documented API errors from Atheris-generated corpora. (1190) by gaborbernat.
Reject unresolved XSD built-in type names and global elements without names. (1191) by gaborbernat.
Reject forbidden characters after URL host decoding and IDNA mapping. (1193) by gaborbernat.
Exercise qualified public APIs through checked Atheris consumers. (1197) by gaborbernat.
Reject undefined RELAX NG references and ignore foreign annotation subtrees during compilation. (1198) by gaborbernat.
Reject RELAX NG include and externalRef patterns without href attributes, including unused definitions. (1199) by gaborbernat.
Keep generated corpus bytes in separate executable target directories with their production metadata. (1200) by gaborbernat.
The Markdown conversion check accepts HTML shapes CommonMark cannot write and rejects list and table content outside its HTML content model. (1208) by gaborbernat.
to_markdown writes an empty <blockquote> as > and an empty <pre> as a fence without a blank line. (1209) by gaborbernat.
to_markdown writes a leading <br> and each <br> of a consecutive run as a hard line break. (1210) by gaborbernat.
The Markdown conversion check treats every HTML block as a paragraph boundary and wraps quote and list item text in paragraphs. (1211) by gaborbernat.
to_markdown keeps a link with an empty href and writes an empty link or image destination as <>. (1212) by gaborbernat.
to_markdown writes a line break inside inline code as a space so the next line cannot open a block. (1213) by gaborbernat.
to_markdown keeps block content inside a heading on the heading line and reads a block edge in link text or a heading as a space. (1214) by gaborbernat.
to_markdown closes and reopens emphasis around a block inside it and starts a new paragraph for inline content after that block. (1215) by gaborbernat.
to_markdown separates a list item's text from a paragraph or block before it with a blank line. (1216) by gaborbernat.
The Markdown conversion check reads the parse tree that to_markdown converts. (1221) by gaborbernat.
Element.css_path no longer hangs on a detached element whose id the document lacks, a node filter that steps its own traverser raises instead of corrupting the outer step, and MutationObserver.observe, TreeWalker, NodeIterator, append and extend keep a node and its tree together when a callback or another thread moves it. (1222) by gaborbernat.
~turbohtml.Element.css_path no longer anchors a detached element on an attached element's id. (1227) by gaborbernat.
A ~turbohtml.NodeIterator now follows removals made by normalize(), Range methods and query edits. (1228) by gaborbernat.
Inserting or wrapping with nodes from another tree no longer races a concurrent move of the target. (1229) by gaborbernat.
~turbohtml.Range and ~turbohtml.StaticRange now read a moving container together with its tree. (1230) by gaborbernat.
~turbohtml.Range methods now read a moving node argument together with its tree. (1231) by gaborbernat.
Raise MemoryError when a CSS selector query fails to allocate memory. (1233) by gaborbernat.
to_markdown drops tabs and line breaks from link and image destinations. (1237) by gaborbernat.
to_markdown keeps the spaces at both ends of inline code. (1238) by gaborbernat.
to_markdown applies emphasis around a table to every cell. (1241) by gaborbernat.
Raise MemoryError when an allocation fails while minifying CSS or a style attribute, instead of returning truncated output or crashing. (1242) by gaborbernat.
to_markdown keeps a <br> and a block edge inside <pre> as line breaks of the code block. (1245) by gaborbernat.
~turbohtml.cssom.StyleSheet and ~turbohtml.cssom.StyleDeclaration keep {} blocks in custom property values. (1246) by gaborbernat.
~turbohtml.cssom.StyleSheet and ~turbohtml.cssom.StyleDeclaration read a backslash-escaped delimiter as part of a name. (1246) by gaborbernat.
Raise MemoryError when to_markdown fails to allocate memory inside a table cell, a nested list or quote, or a converter. (1247) by gaborbernat.
Write a link destination that holds an ASCII control character in the <...> form, the only form CommonMark reads it in. (1248) by gaborbernat.
to_markdown closes emphasis before a block quote inside it and reopens it in the quote. (1249) by gaborbernat.
Skip <title>, <datalist>, <noembed>, <noframes> and <rp> in to_markdown and to_text, which browsers do not render. (1251) by gaborbernat.
Raise MemoryError when parsing or rewriting HTML fails to allocate memory. (1252) by gaborbernat.
Raise MemoryError when an allocation fails while minifying JavaScript, instead of crashing or returning unmangled output. (1253) by gaborbernat.
~turbohtml.Element.extend no longer links a node twice when another thread links its imported copy first. (1254) by gaborbernat.
~turbohtml.cssom.StyleSheet and ~turbohtml.cssom.StyleDeclaration no longer read an escaped slash as the start of a comment. (1255) by gaborbernat.
to_markdown escapes a & that starts a character reference finished by the next text node. (1256) by gaborbernat.
to_markdown escapes emphasis, tag, reference and line-break characters in image alt text. (1258) by gaborbernat.
to_markdown writes line breaks in link and image titles as character references and escapes a & that starts one. (1259) by gaborbernat.
Skip <template> content in to_markdown and to_text, which browsers do not render. (1260) by gaborbernat.
to_markdown leaves out a table row that has no cells. (1261) by gaborbernat.
Raise MemoryError when building, copying or sanitizing elements fails to allocate memory. (1262) by gaborbernat.
to_markdown keeps a list separate from one before it when only an empty block stands between them. (1263) by gaborbernat.
to_markdown writes emphasis as an HTML tag where its delimiters would merge or could not open or close. (1264) by gaborbernat.
xsl:number now inserts the string value of a value that is NaN, infinite or below 0.5, and formats a value of 2^63 or more as its exact integer. (1265) by gaborbernat.
to_markdown places a nested list or an item's first block on its own line where CommonMark reads it back. (1266) by gaborbernat.
to_markdown drops a <br> that nothing visible follows and keeps one after an inner block in the next block. (1267) by gaborbernat.
to_markdown flattens a block inside a table cell and writes a <pre> on a single line as a code span. (1268) by gaborbernat.
to_markdown makes a list item loose when it holds two paragraphs or text after a nested block. (1269) by gaborbernat.
Linker.linkify and Linker.linkify_node raise MemoryError when an allocation fails, instead of SystemError. (1273) by gaborbernat.
Raise MemoryError for an EXSLT str:padding length above sys.maxsize // 4 characters instead of writing past a small buffer. (#933) by @gaborbernat.
<a name="release-1-13-1-fixed"></a>
MemoryError for an EXSLT str:padding length above sys.maxsize // 4 characters instead of writing past a small buffer. (#933) by @gaborbernat.url(...) as one token, and drop a declaration whose string a newline ends (GHSA-9x48-74fj-x342). (#934) by @gaborbernat.ValueError on a circular xsl:attribute-set and RecursionError past 400 levels of use-attribute-sets and template nesting instead of crashing, and apply a shared attribute set once per element. (#935) by @gaborbernat.ValueError when the html method would write > inside a processing instruction. (#936) by @gaborbernat.ValueError in rewrite when set_attribute gets a name, or a comment's set_text gets text, that would inject markup. (#938) by @gaborbernat.< and / apart when minifying CSS, and return a stylesheet unchanged when its minified form would spell a </style its source did not (GHSA-wh2c-9vrv-w597). (#939) by @gaborbernat." as " in attribute values under Formatter.MINIMAL. (#941) by @gaborbernat.< and > in attribute values under every formatter and in the start tags rewrite writes for edited elements. (#942) by @gaborbernat.minify_js from creating a </script or <!-- the source did not spell, and emit an inline script verbatim when its minified form still holds either sequence. (#943) by @gaborbernat.RuntimeError from a serialize_iter stream after a tree edit such as extract or clear, instead of crashing or streaming a cut document. (#944) by @gaborbernat.> or -> in a comment outside canonical XML, -- before > or !> in an HTML comment, a - before another - or at the end in an XML or canonical comment, and ?> in XML instruction data, and split XML CDATA at ]]> (GHSA-7vrw-9mvp-2x7j). (#945) by @gaborbernat.parse_xml trees, and replace an attribute spelled in another case when writing one (GHSA-pjrh-5m66-3wwf). (#946) by @gaborbernat.re:test, re:replace, matches and replace from hanging on patterns such as (a+)+$; oversized patterns and runaway back-references raise ValueError. (#947) by @gaborbernat.ValueError for a schema pattern nested deeper than 250 groups, needing more than 2,000,000 automaton states, or holding a {n,m} quantifier with n above m, and match long alternations without exhausting the stack. (#948) by @gaborbernat.Raise MemoryError for an EXSLT str:padding length above sys.maxsize // 4 characters instead of writing past a small buffer. (933) by gaborbernat.
Split sanitized CSS declarations where a browser does, reading a backslash outside strings as an escape and an unquoted url(...) as one token, and drop a declaration whose string a newline ends (GHSA-9x48-74fj-x342). (934) by gaborbernat.
Raise ValueError on a circular xsl:attribute-set and RecursionError past 400 levels of use-attribute-sets and template nesting instead of crashing, and apply a shared attribute set once per element. (935) by gaborbernat.
Keep XSLT comment and processing-instruction text inside its node, and raise ValueError when the html method would write > inside a processing instruction. (936) by gaborbernat.
Leave out an XSLT element, attribute or processing instruction whose computed name is invalid, keeping an element's content, instead of writing the name as markup. (937) by gaborbernat.
Raise ValueError in ~turbohtml.rewrite.rewrite when set_attribute gets a name, or a comment's set_text gets text, that would inject markup. (938) by gaborbernat.
Keep < and / apart when minifying CSS, and return a stylesheet unchanged when its minified form would spell a </style its source did not (GHSA-wh2c-9vrv-w597). (939) by gaborbernat.
Cap the CSS minifier at 100 nesting levels, dropping a deeper block and copying a deeper function argument through unchanged, instead of overflowing the C stack. (940) by gaborbernat.
Escape " as " in attribute values under Formatter.MINIMAL. (941) by gaborbernat.
Escape < and > in attribute values under every formatter and in the start tags ~turbohtml.rewrite.rewrite writes for edited elements. (942) by gaborbernat.
Stop ~turbohtml.clean.minify_js from creating a </script or <!-- the source did not spell, and emit an inline script verbatim when its minified form still holds either sequence. (943) by gaborbernat.
Raise RuntimeError from a ~turbohtml.Node.serialize_iter stream after a tree edit such as extract or clear, instead of crashing or streaming a cut document. (944) by gaborbernat.
Space apart the sequences that close DOM-built leaf data: a leading > or -> in a comment outside canonical XML, -- before > or !> in an HTML comment, a - before another - or at the end in an XML or canonical comment, and ?> in XML instruction data, and split XML CDATA at ]]> (GHSA-7vrw-9mvp-2x7j). (945) by gaborbernat.
Match unsafe names and the per-name policy options in any ASCII case when sanitizing ~turbohtml.parse_xml trees, and replace an attribute spelled in another case when writing one (GHSA-pjrh-5m66-3wwf). (946) by gaborbernat.
Stop re:test, re:replace, matches and replace from hanging on patterns such as (a+)+$; oversized patterns and runaway back-references raise ValueError. (947) by gaborbernat.
Raise ValueError for a schema pattern nested deeper than 250 groups, needing more than 2,000,000 automaton states, or holding a {n,m} quantifier with n above m, and match long alternations without exhausting the stack. (948) by gaborbernat.
Add strparam to pass text as an XSLT parameter without hand-quoting it. (#928) by @gaborbernat.
<a name="release-1-13-0-added"></a>
strparam to pass text as an XSLT parameter without hand-quoting it. (#928) by @gaborbernat.<a name="release-1-13-0-fixed"></a>
<meta http-equiv="refresh"> redirect URLs against url_schemes. (#920) by @gaborbernat.> as HTML without turning its text into markup. (#921) by @gaborbernat.xsl:import of a FIFO, device or directory with ValueError instead of hanging or exhausting memory. (#922) by @gaborbernat."use strict" directive. (#923) by @gaborbernat.script, style and other raw-text elements unescaped in rewrite. (#925) by @gaborbernat.> and ] inside the quoted parts of an XML <!DOCTYPE> in parse_xml. (#926) by @gaborbernat.<a name="release-1-13-0-documentation"></a>
Add turbohtml.transform.strparam to pass text as an XSLT parameter without hand-quoting it. (928) by gaborbernat.
Reject disallowed URL schemes hidden behind character references in the bleach shim. (919) by gaborbernat.
Check <meta http-equiv="refresh"> redirect URLs against url_schemes. (920) by gaborbernat.
Serialize a CDATA section or processing instruction holding > as HTML without turning its text into markup. (921) by gaborbernat.
Refuse an xsl:import of a FIFO, device or directory with ValueError instead of hanging or exhausting memory. (922) by gaborbernat.
Stop the JavaScript minifier from turning a string it folded or moved into a "use strict" directive. (923) by gaborbernat.
Stop the CSS minifier from gluing two tokens into one when it drops a comment or space between them. (924) by gaborbernat.
Write text into script, style and other raw-text elements unescaped in ~turbohtml.rewrite.rewrite. (925) by gaborbernat.
Accept > and ] inside the quoted parts of an XML <!DOCTYPE> in ~turbohtml.parse_xml. (926) by gaborbernat.
Keep headings and links in wrapped list items parseable as Markdown. (929) by gaborbernat.
Preserve list markers in Markdown table cells and word boundaries in code with block descendants. (930) by gaborbernat.
Warn that builder text inside raw-text elements is written unescaped and that feed fields come back unsanitized. (927) by gaborbernat.
Use iter_elements for lazy, tag-filtered traversal of large trees. The iterator keeps its next match across edits and follows the tree that then conta
<a name="release-1-12-0-added"></a>
iter_elements for lazy, tag-filtered traversal of large trees. The iterator keeps its next match across edits and follows the tree that then contains it. (#915) by @gaborbernat.Use ~turbohtml.Node.iter_elements for lazy, tag-filtered traversal of large trees. The iterator keeps its next match across edits and follows the tree that then contains it. (915) by gaborbernat.