Repository navigation
Releases
Releases · tox-dev/turbohtml
v1.16.5
Immutable
release. Only release title and notes can be modified.
Bug fixes
minify_cssmerges two rules with the same selector when an@mediaor@supportsblock it dropped for a later identical copy was the only thing between them. Before, only minifying the output a second time merged them (#2561) by @gaborbernat.minify_jswithmangleno longer renames alet,constorclassonto the name of an unread top-levelvardeclared in the same loop or block, which wrote a redeclaration and so invalid JavaScript, such asfor(const a of x)var a. A regression in 1.16.0 (#2562) by @gaborbernat.- Parsing documents with many unclosed elements and stray end tags no longer takes quadratic time (#2564) by @gaborbernat.
- Resolve absolute XPath expressions from the root of trees built with
etree.Elementor parsed as single-element fragments withetree.fragment_fromstring(#2560) by @gaborbernat.
v1.16.4
Immutable
release. Only release title and notes can be modified.
Bug fixes
- An empty
langorxml:langnow marks an element's language as unknown, as HTML specifies, so:lang()no longer inherits an ancestor's language through it:<div lang=en><p lang="">stopped matching:lang(en). A quoted empty range,:lang(""), matches elements whose language is unknown or never declared, where it matched nothing before.css_to_xpathtranslates both the same way (#2556) by @gaborbernat. to_markdownwithconverterskeeps*/**delimiters on emphasis that ends in punctuation unless a converted element writes right after it. Before, passing any converters made such runs fall back to raw<em>and<strong>tags, even when no converted element was near them (#2557) by @gaborbernat.
v1.16.3
Immutable
release. Only release title and notes can be modified.
Bug fixes
turbohtml.etreecovers three morelxml.htmlbehaviors:ElementTree.iteriterates from the root element,ElementView.nsmapreturns an empty mapping, andto_lxml/to_lxml_htmlstrip characters XML cannot carry from text, tails and attribute values instead of raisingValueErroror dropping the attribute (#2552) by @gaborbernat.- XPath on a
from_lxml()copy resolves absolute paths from a document, as lxml does. The copy was a detached tree, so//h1inside a predicate searched only below the predicate's context node and/htmlmatched nothing (#2553) by @gaborbernat. turbohtml.etree'sdocument_fromstring,fromstringandfragment_fromstringmake a<template>'s content its children, as lxml does, and keep a<template shadowrootmode>as an ordinary template instead of attaching a shadow root. Before,len(), iteration anditertext()on a template saw nothing, and a declarative shadow root's content was missing fromtext_content()and XPath.strip_elementsnow reaches template content (#2554) by @gaborbernat.
v1.16.2
Immutable
release. Only release title and notes can be modified.
Bug fixes
to_markdown()writes breaks inside emphasis as Markdown hard breaks again when visible text separates them, as in<em>[Image OCR]<br>text<br>[End OCR]</em>, instead of raw<br>tags. Only breaks with nothing visible between them, which would end the paragraph, stay tags (#2551) by @gaborbernat.
v1.16.1
Immutable
release. Only release title and notes can be modified.
Bug fixes
rewrite()now raisesMemoryErrorwhen running out of memory after its first edit, instead of calling the next handler with the error pending, which raisedSystemError(#2540) by @gaborbernat.to_markdown()keeps the whitespace of a<pre>,<textarea>or<listing>it writes as raw HTML inside a table cell. The cell's text is folded onto one line, which turned each run of spaces and each line break in such an element into a single space; its line feeds and space runs are now written as character references (#2541) by @gaborbernat.- A streaming
Tokenizerkeeps a long named character reference run in one text token, astokenize()does, instead of splitting its text once it passed 4096 code points (#2542) by @gaborbernat. minify_cssno longer reads memory it never wrote when an allocation fails inside a nested rule's selector or inside a function folded within another function's arguments; it raisesMemoryErroras everywhere else (#2543) by @gaborbernat.minify_js()raisesMemoryErroragain when an allocation for its scope analysis or fold bookkeeping fails, instead of returning its output (#2544) by @gaborbernat.- Text nested past the 512-level depth cap keeps its source order when the adoption agency moves its parent back under the cap:
<a>, 500 open elements and eight<div>s followed by<p>y<a>xused to readxy(#2545) by @gaborbernat. - A parse that ran out of memory while its open-element stack grew past 64 entries could read past the end of an internal array, and link resolution raised
SystemErrorinstead ofMemoryErrorwhen percent-encoding a link ran out of memory (#2546) by @gaborbernat. - The parser keeps the DOM within its documented 512-level cap when the adoption agency moves a subtree, when closing a form or a misnested
<a>removes an element from the middle of the open-element stack, and when it copies a selected option into a deep<selectedcontent>: such markup used to nest elements past 512 levels,<form><div></form>repeated 600 times reaching 1019 (#2548) by @gaborbernat. - Pickling a node no longer recurses once per tree level. A node pickles as one flat list of its subtree's nodes, so a tree at the 512-level depth cap pickles on Python 3.11, where it raised
RecursionError, and in a thread with a small stack, where a tree a few hundred levels deep crashed the interpreter on Python 3.11 to 3.13. The payload is a third smaller and both pickling and unpickling are faster; pickles written by earlier releases still load (#2549) by @gaborbernat. - Parsing markup that leaves formatting elements open far down the stack of open elements, such as
<i><h1><b><a><s><font><div>repeated, now takes linear time: each formatting tag used to scan the whole stack, so 50,000 repeats took 3.1 seconds instead of 0.25 (#2550) by @gaborbernat.
v1.16.0
Immutable
release. Only release title and notes can be modified.
Features
minify_csswrites whole millisecond counts as seconds (200ms→.2s), 3D transform functions that fix two axes as their single-axis form (translate3d(0,0,z)→translateZ(z)), and drops an@mediaor@supportsblock that an identical later block repeats (#2512) by @gaborbernat.
Changes
minify()writes text and attribute values in the shortest form that reparses to the same tree.&stays literal where it cannot start a reference,>and U+00A0 stay literal in text, an attribute value takes whichever quote it holds fewer of, and a value ending in/or holding a literal&drops its quotes. Pages come out 0.3-1.3% smaller in 0.6-2.8% fewer instructions (#2511) by @gaborbernat.minify_css()merges rules across a/*! ... */bang comment between them and writes the comment after the merged rule. A comment takes no part in the cascade, soa{color:red}/*!k*/b{color:red}→a,b{color:red}/*!k*/. A stylesheet of 200 identical rules split by bang comments comes out 41% smaller (#2535) by @gaborbernat.minify_css()writestransform-originandperspective-originkeywords as offsets, drops a zero z offset, writes a centered position astoporbottom, dropseasefrom atransitionlayer that names its property first, and drops the initialoutsideanddiscfromlist-style. animate.css comes out 212 bytes smaller and foundation.css 121 bytes (#2537) by @gaborbernat.
Bug fixes
- RELAX NG validation no longer raises
ValueErroras too ambiguous for a valid document with repeated blocks of optional elements, and checking a block takes time in proportion to the elements it holds (#2448) by @gaborbernat. (#2382) - XPath predicates that select the nearest node with
[1]before another predicate, such asancestor::b[1][@x], no longer slow down quadratically on long documents; results are unchanged (#2446) by @gaborbernat. (#2444) Rangeboundaries now follow the DOM live-range rules throughnormalize()and whitespace collapse. A boundary on a parent element at a text node thatnormalize()merges moves into the merged text, and a boundary past whitespace that the collapse drops shifts with the text, socompare_point()matches the text again (#2447) by @gaborbernat. (#2445)Element.after()inrewrite()on an unclosed raw-text element, such as a<script>or<style>with no end tag, now writes its text unescaped, so it reads back as written and a carriage return is written as a line feed. Text that would end the element early raisesValueError, as it does forappend();html=Truecontent is written as given, as it is forappend()(#2450) by @gaborbernat. (#2449)encode()now refuses U+000E, U+000F and U+001B under a stateful codec whatever its name, including one that cannot encode the sample characters the probe used before. Such a codec wrote the raw byte, which a decoder reads as a shift, so the markup could read back with a different meaning.tostring()writes the character as a reference, as it does for the ISO-2022 codecs (#2454) by @gaborbernat. (#2453)- Encoding detection now agrees with chardetng on input that starts with an ASCII run followed by a non-ASCII byte. Such input could land on another single-byte encoding:
b"a1111\xaa "detected as ISO-8859-4 where chardetng says windows-1252. The confidence reported for some of these inputs changes too, so with athresholdsuch input can now detect an encoding where it returnedNone(#2473) by @gaborbernat. - Encoding detection keeps GBK in the running when a four-byte GB18030 sequence ends in a 0xFF byte, or in an ASCII byte after a 0xA0 or 0xFE byte, as chardetng does. A stream such as
b"\xe26\x90\xff0\xa3\x89"with a.cnhint now detects as GBK instead of IBM866 (#2487) by @gaborbernat. - Encoding detection no longer scores the ASCII byte that follows an unmapped Big5 character as a letter, as chardetng does. Some streams that hold such a pair now detect as Big5 instead of windows-1252 (#2488) by @gaborbernat.
- On 32-bit builds, minifying a very large stylesheet or script, or escaping a very long identifier, now raises
MemoryErrorinstead of letting a buffer size wrap around and writing past the allocation (#2493) by @gaborbernat. rewrite()no longer raisesValueErrorwhenElement.after()adds text to an unclosed<script>whose input already holds a<!--. Text that would end the element early still raisesValueError(#2497) by @gaborbernat.- Writing a document with
meta_charset=Trueno longer refuses text the declared encoding can represent: the bytes now come from the WHATWG encoder the<meta charset>names, and only a character with no byte in that encoding is refused (#2499) by @gaborbernat. - On a free-threaded build, appending an element that holds wrapped descendants into another tree no longer crashes when another thread moves one of those descendants at the same time. Releasing the old tree's references during the move could let the other thread change the subtree being walked (#2523) by @gaborbernat.
minify_js()folds integer arithmetic over literals with_separators.1_0+1printed as10+1, which a second minification then folded to11, so minifying the output again changed it (#2529) by @gaborbernat.minify_js()keeps a read or write of alet,constorclassbinding that can run before the declaration initializes it, since that access throws aReferenceError. It droppedx=2fromx=2;let x=1and the read ofxfromy=xwithyunused, also when the access sat in a hoisted function called early or after a skippedswitchcase (#2526) by @gaborbernat.minify_js()keeps assignments to top-level bindings. It droppedx=2fromvar x=1;x=2when the script never readxagain, but a top-level binding is a global that another script on the page can read (#2525) by @gaborbernat.minify_js()keeps the name of an outer binding that a block function inside a same-namedcatchclause shadows. Annex B hoists such a function to avarof the enclosing function, but only thecatchparameter kept its name, so infunction g(){try{}catch(g){{function g(){}}}return typeof g}the renamed self-name changedtypeof gfrom"undefined"to"function"(#2527) by @gaborbernat.minify_js()no longer folds arithmetic over a legacy octal literal as if it were decimal:010*2became20where it evaluates to16(#2528) by @gaborbernat.minify_js()no longer inlines a function declaration into the body of awhileordo-whileloop written without braces, where the function was created again on every iteration. A block the output prints without braces also resolves its names as the output parses, so minifying the output again changes it in fewer cases (#2524) by @gaborbernat.minify_js()weighs a number literal by the spelling it prints, not the one in the source, when deciding whether to copy it into every read.const h=3600000read twice now inlines as36e5in one pass; before, the second minification inlined it, so minifying the output again changed it (#2531) by @gaborbernat.parse()again reportsunexpected-null-characterfor a NUL inside a long run of plain Latin-1 text on x86-64. It dropped that error, while a streamed parse of the same string reported it (#2467) by @gaborbernat.
Performance
- Parsing XML no longer copies plain attribute values twice: a value with no reference and no whitespace to normalize is written straight into the tree, cutting the parse of a document with a 100k-character attribute value about fourfold (#2464) by @gaborbernat.
- Building elements with
Element(...)andE.<tag>(...)from plain dicts runs faster: the mapping check skips the abstract base class and short attribute names are lowercased without a heap allocation (#2469) by @gaborbernat. - Encoding detection skips over long runs of ASCII in each candidate encoding instead of scoring them byte by byte, so detecting a mostly ASCII document with a legacy encoding takes much less time (#2470) by @gaborbernat.
- Encoding detection returns sooner when a byte-order mark or a
<meta>declaration decides the answer, both for a one-shot call and f...
v1.15.12
Immutable
release. Only release title and notes can be modified.
Bug fixes
- Base URL, meta refresh and link extraction now skip
<base>and refresh<meta>inside<template>, and SVG or MathMLbaseandmetaelements, as browsers do (#2231) by @gaborbernat. (#1685) - XSD range facets now follow XML Schema for NaN bounds, including list items, and for long decimal and integer values that rounding used to misjudge (#2242) by @gaborbernat. (#1736)
to_markdown()drops comments from tables and lists nested in pipe-table cells, where a comment ending in a dash used to show as visible text (#2226) by @gaborbernat. (#2223)- Inserting or replacing HTML inside a MathML annotation-xml with an HTML encoding now creates HTML elements, and sanitizing MathML children placed there escapes them (#2229) by @gaborbernat. (#2228)
- XSD length, minLength, maxLength, totalDigits and fractionDigits facets now apply their limits exactly, where large limits used to be distorted (#2247) by @gaborbernat. (#2232)
- Content added with
prepend()orappend()now stays in place when arewritehandler unwraps the element withremove_and_keep_content()(#2248) by @gaborbernat. (#2233) minify_css()keeps a string's value when a line continuation follows a hex escape, instead of joining the escape to the next character (#2241) by @gaborbernat. (#2234)- Sanitizing a kept
<style>whose last declaration has an unclosed parenthesis no longer appends another;}on each pass, so re-sanitizing the output returns it unchanged (#2251) by @gaborbernat. (#2235) - Refresh
<meta>content on XML input is now scheme-checked whatever the case or order of itshttp-equivattributes (#2261) by @gaborbernat. (#2237) - Non-ASCII list bullets, emphasis and strong wrappers, and the
to_text()cell separator and default image alt are now written as given instead of as mojibake (#2239) by @gaborbernat. (#2238) minify_js()acceptsget,setandasyncas shorthand names with a default value in destructuring patterns instead of raising an error (#2243) by @gaborbernat. (#2240)- The strict language filter now judges a subdomain language on the host a browser opens, so every spelling of one host gets the same result (#2273) by @gaborbernat. (#2244)
- Escape the text of a raw-text node such as
styleorxmpwhenlinkifyreturns it as a string (#2249) by @gaborbernat. (#2245) Node.resolve_links()now resolves a link with a different special scheme and extra slashes before its host, such asftp:///example.com/p, to the host it names (#2268) by @gaborbernat. (#2250)- XSD
xs:anyandxs:anyAttributewildcards now match the elements and attributes their namespace, occurrence and processing settings admit, so validation verdicts follow them (#2256) by @gaborbernat. (#2252) - Compiling an XSD schema now raises
ValueErrorfor a group in a content model that has norefattribute, instead of accepting it (#2258) by @gaborbernat. (#2253) - XSLT literal result elements now honor their own
xsl:exclude-result-prefixesattribute, so excluded namespace declarations are no longer copied to the output (#2259) by @gaborbernat. (#2254) - A carriage return in script, style or other raw-text content is now written as a line feed, and rewritten text writes it as
(#2284) by @gaborbernat. (#2255) minify_js()folds long chains of string literals joined with+in time that grows linearly with the chain's length (#2264) by @gaborbernat. (#2257):has()with child or sibling combinators in its argument no longer slows quadratically on deeply nested documents (#2271) by @gaborbernat. (#2262)- Attribute names with a lone surrogate are now returned as parsed (#2265) by @gaborbernat. (#2263)
- A label passed as encoding= that contains a NUL byte now raises LookupError, and the error shows the whole label (#2274) by @gaborbernat. (#2269)
minify_js()raises an error for a string, template or regex token where a property name must be, such as after.or as a template key (#2275) by @gaborbernat. (#2270)- Node.encode with meta_charset now raises ValueError when the encoded bytes would read back as different text under the declared encoding, instead of writing them (#2282) by @gaborbernat. (#2276)
Node.resolve_links()now resolves a special-scheme link written without slashes before its host, and reads a backslash as a path separator, as a browser does (#2295) by @gaborbernat. (#2277)- Range facets on
xs:gYear,xs:gYearMonth,xs:gMonth,xs:gMonthDayandxs:gDaynow reject values outside their bounds (#2279) by @gaborbernat. (#2278) - Schemas with a top-level group, complex type, simple type, attribute or attribute group that has no name now fail to compile with
ValueError(#2281) by @gaborbernat. (#2280) - Streaming parsers no longer buffer unfinished character references beyond their output: long named runs and numeric digits leave the input as they arrive (#2294) by @gaborbernat. (#2283)
minify_js()keeps input that ends right after a member dot unchanged, as it did before the literal-token check, instead of raising an error (#2287) by @gaborbernat. (#2285)- Converting HTML to Markdown no longer takes quadratic time on a run of digits followed by elements that write no Markdown (#2296) by @gaborbernat. (#2286)
- XPath predicates that look at ancestor, sibling, preceding or following nodes no longer slow down quadratically on long documents; results are unchanged (#2314) by @gaborbernat. (#2288)
- RELAX NG schemas that nest
grouppairs of optional elements now accept valid documents instead of raisingValueErroras too ambiguous (#2326) by @gaborbernat. (#2290) - XSD validation now checks prefixed attributes against declarations and wildcards by namespace, so anyAttribute namespace and processContents settings apply to them. Undeclared xml: attributes are now reported (#2330) by @gaborbernat. (#2291)
- A live Range now moves its boundaries when text is replaced, deleted, split or normalized and when nodes are removed or inserted, so offsets and comparisons stay correct (#2323) by @gaborbernat. (#2292)
- Serializing markup under an ISO-2022 codec registered under another name now refuses U+000E, U+000F and U+001B, as the built-in ISO-2022 codecs do (#2315) by @gaborbernat. (#2305)
- A carriage return in an attribute value written by
rewrite()is now written as , and in a comment as a line feed, so the outpu...
v1.15.11
Immutable
release. Only release title and notes can be modified.
Bug fixes
- 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
XPathDepthErrorduring parsing, matching evaluation (#1675) by @gaborbernat. Element.insert()andElementView.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,
rewritewrites 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 atype=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
computed_stylefast 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, solinks(),rewrite_links(),resolve_links()andmeta_refresh()agree, and text right after the delay is no redirect (#2126) by @gaborbernat. (#1737) - A loop of
Rangecalls over the children of one wide element no longer slows down with the square of the child count (#2144) by @gaborbernat. (#1743) minify_cssno longer brings to life an@import,@namespace,@charsetor@layerstatement 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
ValueErrorinstead 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
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 raiseValueError(#2196) by @gaborbernat. (#1758)- Link extraction, rewriting and sanitizing now read
srcsetcandidates 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.dataor theetreetextandtailproperties now keeps memory proportional to the current text instead of every value assigned (#2133) by @gaborbernat. (#1760) - Minifying a
styleattribute 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:listandxs:unionvalues are now checked against their item or member types, includingxs:NMTOKENS,xs:IDREFSandxs:ENTITIES, instead of accepting any text (#2147) by @gaborbernat. (#1765)- Style attributes and
<style>bodies no longer keep properties outsidecss_propertiesthat browsers apply, and drop declarations containing a unicode-range token (#2137) by @gaborbernat. (#1768) - Edits that leave
<style>elements alone no longer makecomputed_stylerecompile 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 acharsetthat names no encoding no longer hides acontentdeclaration, as in browsers (#2155) by @gaborbernat. (#1775) minifyoutput 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_csskeeps 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_csskeeps 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 acalc()group left open at end of input folds in one pass (#2197) by @gaborbernat. (#1852) - Minifying CSS with stray brackets, hex escapes or CDO/CD...
v1.15.10
Immutable
release. Only release title and notes can be modified.
Bug fixes
- 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.
v1.15.9
Immutable
release. Only release title and notes can be modified.
Bug fixes
- 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
MemoryErrorand 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.