Repository navigation
Align literal-mode and marked-section handling with browsers on malformed input #64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
oalders
wants to merge
28
commits into
master
Choose a base branch
from
nul-byte
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
ba39198
Report unclosed script/style/title tail as text at EOF
oalders 647bd3b
Fix marked section state at end of document
pjcj d75539f
Recognise TEMP as a marked section keyword
pjcj 0c4de42
Close marked sections with unknown keywords
pjcj 2d6aa8e
Document marked section status keywords
pjcj 38d14a2
Clear eof flag when a handler stops the parse
pjcj b5c1922
Take only the encoding from an unclosed title
pjcj 62dff0f
Report no empty text event at ]]>
pjcj 7122447
Close literal elements at end tags with attributes
pjcj 0f64acf
Emit the implicit end when nothing is buffered
pjcj 3bf2b15
Flush the pending end tag before ignore cleanup
pjcj 46865c6
Guard the parser object during the eof flush
pjcj 29bfa3c
Emit the implicit end for every literal element
pjcj 8a85ddc
Simplify the literal branch of the EOF flush
pjcj 7cb7215
Assert the full event list for NUL literal cases
pjcj 0ff5d9e
Defer the literal end inside marked sections
pjcj 119894b
Extract the synthetic end report into a helper
pjcj 739cc67
Keep the start tag's case in the implicit end
pjcj ded6c21
Seek only the terminator in a marked section tail
pjcj 836b6bc
Say the encoding scan reads only a title's text
pjcj 103c0a6
Let the title text scan set only the encoding
pjcj dde8b67
Document the implicit end of literal elements
pjcj dbefb57
Condense the Changes entries
pjcj 4928db3
Reset the relaxed comment-end state at end of document
oalders 99b5449
Copy the literal element name when cloning a parser
oalders 116521c
Guard the literal element name copy at runtime
oalders dab4520
Clarify the title encoding scan and the marked-section end
oalders 0af567b
Fix a wording slip in the marked-section end comment
oalders File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[general] Important — pre-existing EOF asymmetry across literal-mode elements. This fix gives
script/stylean implicit close event andtitleapending_end_tagclose at EOF, butxmp/iframe/textarea/plaintexthit the earlybreakjust above and fall through to the generic "rest is text" path with no synthesized end event — the element is left open whenliteral_mode/is_cdataare zeroed during state reset (verified:<textarea>fooat EOF produces astartbut no matchingend). This is not a regression from this PR (those four elements were already safe from the tail-re-parse bug, and theChangesentry correctly lists only script/style/title), but the resulting asymmetry is worth an explicit maintainer decision: either accept it as documented behaviour or extend end-event synthesis to the other four in a follow-up.