Open
Conversation
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



This PR contains the following updates:
10.1.0→12.0.0Release Notes
fb55/htmlparser2 (htmlparser2)
v12.0.0Compare 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<script/>,<style/>, etc. now enter their raw-text state (the/is ignored per spec) unlessrecognizeSelfClosingis enabledSVG & MathML
<svg>are case-adjusted per spec (foreignObject,clipPath, etc.)</svg>/</math>no longer corrupt the parser's context trackingComments & 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<!DOCTYPE,<?…,<![CDATA[…at EOF emit the correct token typeImplicit open/close
<h1>–<h6>implicitly close other headings<a>closes a previous<a><form>is ignored when one is already open<image>is rewritten to<img>outside foreign content</>is silently ignored instead of emitted as textOther fixes
reset()not clearing attribute state, which could leak data acrossparseComplete()calls#2387
Full Changelog: fb55/htmlparser2@v11.0.0...v12.0.0
v11.0.0Compare Source
Breaking Changes
require()is no longer supported. Useimportinstead.domhandlerv6,domutilsv4,domelementtypev3,entitiesv8.Features
WebWritableStreamfor the Web Streams API, enabling direct piping fromfetch()response bodies into the parser #2376Bug Fixes
--!>as a closing sequence per the HTML spec, and<!-->is recognized as an empty comment in HTML mode #2382<?xml ... ?>) now require the full?>closing sequence instead of just>#2382reset()not clearingisSpecialandsequenceIndexstate, which could cause incorrect parsing after reuse #2382<!-->is no longer treated as a complete comment inxmlMode#2383Other Changes
New Contributors
Full Changelog: fb55/htmlparser2@v10.1.0...v11.0.0
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
Automerge: Enabled