Skip to content

v4.5.0

Compare
Choose a tag to compare
@fb55 fb55 released this 13 Apr 18:09

New Features

entities now features an EntityDecoder class that can be used to decode entities across multiple chunks. This is needed to parse streams, and will be the foundation for entity decoding in htmlparser2 and parse5.

For users of this library, the most welcome addition will be a new attribute decoding mode, which will ignore some entities that were previously parsed (eg. `foo=bar&amp=boo' will be left unchanged).

entities' decode functions all use the new decoder under the hood. There is a new decodeHTMLAttribute function for attribute parsing, and some rare edge-cases where entities diverged from the HTML spec have been eliminated.

Relevant PRs

  • feat(decode): Add EntityDecoder class by @fb55 in #1136
  • fix(decode): Handle chunks for numeric entities by @fb55 in #1146

Small Changes

Full Changelog: v4.4.0...v4.5.0