NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #2617 most downloaded on npm
Parses well-formed HTML (meaning all tags closed) into an AST and back. quickly.
Last release 2 months ago
22 Jul 2026
Ships unpredictably
gaps range from 1 weeks to 5.2 years
Some releases are documented
notes for 5 of 15 stable releases
Nothing withdrawn
no release was ever pulled
12 years old
15 releases · first in 2014
Fixed: allowedTags no longer swallows a valid tag that ends up in the same raw match as a stray < (e.g. Values: <10, <20, and x ). Only the leading <
Fixed: allowedTags no longer swallows a valid tag that ends up in the same raw match as a stray < (e.g. Values: <10, <20, and <bold>x</bold>). Only the leading < of a disallowed match is neutralized and scanning resumes right after it, matching the escaping semantics react-i18next used before.
Found by react-i18next's test suite while migrating it to the new allowedTags option. See CHANGELOG.md.
Fixed: allowedTags no longer swallows a valid tag that ends up in the same raw match as a stray < (e.g. Values: <10, <20, and <bold>x</bold>). Only the leading < of a disallowed match is neutralized and scanning resumes right after it, matching the escaping semantics react-i18next used before.
Found by react-i18next's test suite while migrating it to the new allowedTags option. See CHANGELOG.md.
allowedTags: when a stray < and a valid tag ended up in the same raw match (e.g. Values: <10, <20, and <bold>x</bold>), the whole match was treated as text and the valid tag was lost. Now only the leading < of a disallowed match is neutralized and scanning resumes, so glued valid tags are recognized.One column per quarter.
Functionally builds on 3.1.0; see CHANGELOG.md for the full picture including breaking changes and migration notes.
First release from the package's new maintenance home. Functionally builds on 3.1.0; see CHANGELOG.md for the full picture including breaking changes and migration notes.
Breaking: exports map (no deep dist/ imports), boolean attributes are null in the AST and stringify bare, doctype parses as a void node, <script>/<style> content is raw text.
Added: allowedTags parse option, named exports, rewritten TypeScript types (discriminated union incl. CommentNode), zero runtime dependencies, CI with a react-i18next integration gate.
Fixed: comments containing >, unquoted attribute values containing =, double-quote escaping in stringify, and parse no longer mutates the caller's options object.
First release from the package's new maintenance home. Functionally builds on 3.1.0; see CHANGELOG.md for the full picture including breaking changes and migration notes.
Breaking: exports map (no deep dist/ imports), boolean attributes are null in the AST and stringify bare, doctype parses as a void node, <script>/<style> content is raw text.
Added: allowedTags parse option, named exports, rewritten TypeScript types (discriminated union incl. CommentNode), zero runtime dependencies, CI with a react-i18next integration gate.
Fixed: comments containing >, unquoted attribute values containing =, double-quote escaping in stringify, and parse no longer mutates the caller's options object.
First release from the package's new maintenance home: i18next/html-parse-stringify. Functionally it builds on 3.1.0; the breaking changes below are deliberate and small.
exports map with dual ESM/CJS builds and bundled types. Deep imports like html-parse-stringify/dist/... no longer work; import the package root instead.disabled) now carry the value null in the AST (was '') and stringify bare: <input disabled/> instead of <input disabled=""/>.<!DOCTYPE html> parses as a void node and round-trips correctly (#54). Previously the rest of the document was nested inside it and stringify produced </!DOCTYPE>.<script> and <style> content is treated as raw text: the whole content becomes a single text child, and </> inside it no longer produce bogus tag nodes.> (e.g. <!-- a > b -->) are now parsed fully instead of being cut at the first >.= are no longer truncated at the second = (<div data-x=a=b> now keeps a=b).stringify escapes double quotes in attribute values as ", so values parsed from single-quoted or multiline attributes can't produce broken markup.parse no longer mutates the caller's options object.allowedTags parse option (array of names or predicate): only listed tags are parsed as markup, everything else tag-shaped stays literal text. This is the parser-level version of the escaping that consumers like react-i18next had to implement themselves.import { parse, stringify } from 'html-parse-stringify' (the default export remains for compatibility).TagNode | TextNode | CommentNode | ComponentNode) (#56). CommentNode was missing entirely before.void-elements dependency is inlined.Released from the original repository. All community fixes that had been waiting:
Released from the original repository. All community fixes that had been waiting:
< is no longer truncated (#64, closes #59)2.0.2 Fixed incorrect attribution for a vulnerability disclosure. The vulnerability was discovered by Yeting Li; Sam Sanoop reached out about it.
Historical entries, migrated from the original README:
3.0.1 Merged #47 which makes void elements check case insensitive. Thanks again, @adrai for this contribution!3.0.0 Merged #46 which fixed an issue with handling of whitespace. Major version bump since this changes behavior for whitespace-only nodes (see merged PR and #45 for more details). Thanks @adrai for this contribution!2.1.1 Merged #41 which fixed an issue with tag nesting. Thanks @ericponto.2.1.0 Merged support for numeric tags, enabling the use case described in PR #43. Thanks @kachkaev.2.0.3 Fixed failed publish (accidentally published an empty package).2.0.2 Fixed incorrect attribution for a vulnerability disclosure. The vulnerability was discovered by Yeting Li; Sam Sanoop reached out about it.2.0.1 Addressed a regular expression denial of service issue found by Yeting Li and reported by Sam Sanoop of Snyk.2.0.0 Updated to a more modern build system, switched to prettier. Added support for top level text nodes thanks to @jperl, and comments thanks to @pconerly.1.0.0 - 1.0.3 No big changes, bug fixes and speed improvements.Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Wrote TypeScript definitions for html-parse-stringify ( HenrikJoreteg#11 )
Wrote TypeScript definitions for html-parse-stringify (HenrikJoreteg#11)
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →