Skip to content

v7.0.0

Latest

Choose a tag to compare

@domenic domenic released this 21 Sep 07:01
  • Removed support for Node.js v20, and raised the minimum supported Node.js v22 version to v22.13.0.
  • Added support for sniffing XML encoding declarations in both HTML and XML modes, following the HTML Standard for HTML and WebKit's behavior for XML.
  • Added detection of UTF-16 byte signatures without a byte order mark (BOM) in both modes.
  • Added the maxPrescanBytes option to configure the HTML <meta> scan limit, defaulting to 1024 bytes and accepting Infinity to scan the entire input or 0 to skip meta scanning.
  • Fixed a TypeError when a <meta> element's content="" attribute ends in a truncated charset parameter. (@FedgeNo)
  • Fixed HTML encoding sniffing to ignore <meta> tags whose closing > is missing or falls beyond the prescan limit.