Skip to content
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

fix(tokenizer): Parse entities in <title> tags #614

Merged
merged 1 commit into from
Oct 20, 2020
Merged

Conversation

fb55
Copy link
Owner

@fb55 fb55 commented Oct 20, 2020

Fixes #592.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 97.684% when pulling 80ce619 on fix/entity-in-title into 1947a31 on master.

@fb55
Copy link
Owner Author

fb55 commented Oct 20, 2020

Beat you to it, hope that's alright!

@billneff79 @cheeseandcereal Would love a review if you guys have a moment.

"data": ["the \"title\""]
},
{
"event": "closetag",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this event actually fired? I don't see a </title> in the html string for this fixture

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The parser will close all currently open tags at the end of the input.

Copy link

@cheeseandcereal cheeseandcereal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pulled and tested locally, confirming fix. lgtm

@fb55
Copy link
Owner Author

fb55 commented Oct 20, 2020

Thanks a lot @cheeseandcereal!

@fb55 fb55 merged commit 3295a8b into master Oct 20, 2020
@fb55 fb55 deleted the fix/entity-in-title branch October 20, 2020 22:37
@billneff79
Copy link
Contributor

Beat you to it, hope that's alright!

@billneff79 @cheeseandcereal Would love a review if you guys have a moment.

Awesome! Thanks @fb55 . My only thought is that it would be tidy and safe to have one more unit test to verify that title does not decode entities when decodeEntities=false. As my humble contribution to this fix I've added that test fixture in #615

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.

<title> tag content will never decode html entities
4 participants