Skip to content

fix(deps): update dependency htmlparser2 to v12#460

Open
renovate[bot] wants to merge 1 commit into
chore/all-my-stuffsfrom
renovate/htmlparser2-12.x
Open

fix(deps): update dependency htmlparser2 to v12#460
renovate[bot] wants to merge 1 commit into
chore/all-my-stuffsfrom
renovate/htmlparser2-12.x

Conversation

@renovate

@renovate renovate Bot commented Jul 10, 2026

Copy link
Copy Markdown

This PR contains the following updates:

Package Change Age Confidence
htmlparser2 ^10.1.0^12.0.0 age confidence

Release Notes

fb55/htmlparser2 (htmlparser2)

v12.0.0

Compare Source

What's Changed

This release aligns HTML parsing with the WHATWG spec Almost all changes are to HTML mode only — XML mode is unaffected unless noted.

Raw-text & RCDATA tags

  • <iframe>, <noembed>, <noframes>, and <plaintext> are now raw-text tags, their content is no longer parsed as HTML
  • <textarea> now decodes entities like <title> already did
  • Self-closing <script/>, <style/>, etc. now enter their raw-text state (the / is ignored per spec) unless recognizeSelfClosing is enabled

SVG & MathML

  • Tag names inside <svg> are case-adjusted per spec (foreignObject, clipPath, etc.)
  • CDATA sections inside foreign content are treated as text
  • Special-tag detection is disabled inside foreign content
  • Stray </svg> / </math> no longer corrupt the parser's context tracking

Comments & declarations

  • <!-->, <!--->, <!->, <!> now parse as valid comments per spec
  • <?…> and non-DOCTYPE <!…> in HTML mode emit bogus comments instead of being silently dropped
  • <!DOCTYPEhtml> (no space) is recognized as a DOCTYPE
  • Unclosed comments, <!DOCTYPE, <?…, <![CDATA[… at EOF emit the correct token type

Implicit open/close

  • <h1><h6> implicitly close other headings
  • <a> closes a previous <a>
  • Nested <form> is ignored when one is already open
  • <image> is rewritten to <img> outside foreign content
  • </> is silently ignored instead of emitted as text

Other fixes

  • Fixed reset() not clearing attribute state, which could leak data across parseComplete() calls

#​2387

Full Changelog: fb55/htmlparser2@v11.0.0...v12.0.0

v11.0.0

Compare Source

Breaking Changes

  • The module is now ESM only #​2381
    • CommonJS require() is not supported in legacy environment anymore. Use import instead.
    • The minimum Node.js version is now 20.19.0.
  • Dependencies have been bumped to their latest major versions: domhandler v6, domutils v4, domelementtype v3, entities v8.
  • The deprecated parseDOM function was removed.

Features

  • Added WebWritableStream for the Web Streams API, enabling direct piping from fetch() response bodies into the parser #​2376

Bug Fixes

  • Comments now accept --!> as a closing sequence per the HTML spec, and <!--> is recognized as an empty comment in HTML mode #​2382
  • XML processing instructions (<?xml ... ?>) now require the full ?> closing sequence instead of just > #​2382
  • Fixed reset() not clearing isSpecial and sequenceIndex state, which could cause incorrect parsing after reuse #​2382
  • Fixed XML comment parsing: <!--> is no longer treated as a complete comment in xmlMode #​2383

Other Changes

  • Expanded README with full API reference, parser options, events, and practical examples #​2384

New Contributors

Full Changelog: fb55/htmlparser2@v10.1.0...v11.0.0


Configuration

📅 Schedule: (in timezone Europe/Paris)

  • Branch creation
    • Between 12:00 AM and 03:59 AM (* 0-3 * * *)
  • Automerge
    • Between 12:00 AM and 03:59 AM (* 0-3 * * *)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@sharevb sharevb force-pushed the chore/all-my-stuffs branch 3 times, most recently from 1cc77eb to 02df0f3 Compare July 11, 2026 15:17
@renovate renovate Bot force-pushed the renovate/htmlparser2-12.x branch from a998b41 to 1eb60ad Compare July 12, 2026 11:49
@sharevb sharevb force-pushed the chore/all-my-stuffs branch 2 times, most recently from 41fa755 to 0620f57 Compare July 12, 2026 14:58
@renovate renovate Bot force-pushed the renovate/htmlparser2-12.x branch from 1eb60ad to 1b2a03c Compare July 12, 2026 16:26
@sharevb sharevb force-pushed the chore/all-my-stuffs branch from e7d0ce8 to 41464cf Compare July 12, 2026 19:04
@renovate renovate Bot force-pushed the renovate/htmlparser2-12.x branch from 1b2a03c to d274fcb Compare July 12, 2026 19:16
@sharevb sharevb force-pushed the chore/all-my-stuffs branch from 138e700 to c6447be Compare July 12, 2026 21:05
@renovate renovate Bot force-pushed the renovate/htmlparser2-12.x branch from d274fcb to fecb4f9 Compare July 12, 2026 21:11
@sharevb sharevb force-pushed the chore/all-my-stuffs branch from c6447be to 23dc0d4 Compare July 12, 2026 21:11
@renovate renovate Bot force-pushed the renovate/htmlparser2-12.x branch from fecb4f9 to 60d1129 Compare July 12, 2026 21:22
@sharevb sharevb force-pushed the chore/all-my-stuffs branch from 74a0eb2 to 96a2079 Compare July 13, 2026 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants