Skip to content

Handle escaping < in edge cases where it doesn't start a tag (#544)#667

Merged
willkg merged 1 commit intomozilla:mainfrom
willkg:544-lessthan
Jun 2, 2022
Merged

Handle escaping < in edge cases where it doesn't start a tag (#544)#667
willkg merged 1 commit intomozilla:mainfrom
willkg:544-lessthan

Conversation

@willkg
Copy link
Member

@willkg willkg commented Jun 1, 2022

The html5lib tokenizer kicks up a parse error token when there's a <
that isn't the start of a tag. This adds some handling for that case and
treats the < plus whatever is after it as characters data.

Fixes #544.

@willkg willkg requested a review from g-k June 1, 2022 17:26
@willkg
Copy link
Member Author

willkg commented Jun 1, 2022

@g-k Can you skim this, please?

The html5lib tokenizer kicks up a parse error token when there's a <
that isn't the start of a tag. This adds some handling for that case and
treats the < plus whatever is after it as characters data.
@willkg willkg merged commit ed06d4e into mozilla:main Jun 2, 2022
@willkg
Copy link
Member Author

willkg commented Jun 2, 2022

Thank you!

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.

Left angle bracket '<' with any characters (tag or not) and no closing right angle bracket prevents remaining text from being returned

2 participants