Skip to content

Releases: jsdom/html-encoding-sniffer

6.0.0

26 Dec 03:54

Choose a tag to compare

Reverted back to the 4.0.0 behavior of returning encoding names instead of labels.

Added the xml option.

5.0.0

23 Dec 05:05

Choose a tag to compare

Raised the minimum required Node.js version to ^20.19.0 || ^22.12.0 || >=24.0.0.

The package now returns encoding labels, not encoding names. (In practice, it returns the lowercase versioned of what it previously returned.)

4.0.0

12 Nov 07:39

Choose a tag to compare

Raised the minimum required Node.js version to v18.

<meta charset="x-user-defined"> is now handled correctly.

3.0.0

18 Sep 22:40

Choose a tag to compare

Raised the minimum required Node.js version to v12.

Although it worked before by accident, as of this version any Uint8Array input is officially supported, not just Node.js Buffer objects.

2.0.1

23 Feb 22:30

Choose a tag to compare

  • Fixed cases involving trailing spaces inside attribute values, e.g. content="text/html; charset=iso8859-2 ".
  • Fixed cases involving two appearances of the string charset, e.g. content="charsetcharset=iso-8859-2".
  • Fixed cases involving multiple attributes with the same name, e.g. <meta http-equiv="refresh" http-equiv="Content-Type" content="text/html; charset=iso8859-2">.

2.0.0

23 Feb 22:28

Choose a tag to compare

  • (Breaking) updated minimum required Node.js version to v10.
  • Fixed cases involving the character sequence ><meta.
  • Fixed cases involving "short comments", i.e. <!-->.

1.0.2

23 Oct 00:16

Choose a tag to compare

Relicensed as MIT

1.0.1

16 Oct 04:24

Choose a tag to compare

Fixed an off-by-one error in the <meta> sniffing code that led to it failing to detect the encoding correctly when attributes were unquoted.

1.0.0

16 Oct 03:54

Choose a tag to compare

Extracted from jsdom, with some changes to do manual per-spec content-type parsing.