-
-
Notifications
You must be signed in to change notification settings - Fork 32k
htmlparser unclosed script tag causes data loss #86155
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
Comments
When the A simple test which demonstrates the issue is attached. I see that in Lib/html/parser.py#L244-L249 there are two nested if statements which both check for I should note that the input is invalid HTML. However, the existing behavior results in data loss. Within any other unclosed tag (other than |
Waylan, 3.7 and before only get security fixes. To me, this might be considered an enhancement rather than bug fix, but I will leave that to Ezio. |
…ser (GH-22658) When calling .close() the HTMLParser should flush all remaining content, even when that content is in an unclosed script or style tag.
…TMLParser (pythonGH-22658) When calling .close() the HTMLParser should flush all remaining content, even when that content is in an unclosed script or style tag. (cherry picked from commit 53383e9) Co-authored-by: Waylan Limberg <[email protected]>
…TMLParser (pythonGH-22658) When calling .close() the HTMLParser should flush all remaining content, even when that content is in an unclosed script or style tag. (cherry picked from commit 53383e9) Co-authored-by: Waylan Limberg <[email protected]>
Thank you for your contribution, @waylan. Sorry it took so long to review your PR. |
…HTMLParser (GH-22658) (GH-133845) When calling .close() the HTMLParser should flush all remaining content, even when that content is in an unclosed script or style tag. (cherry picked from commit 53383e9) Co-authored-by: Waylan Limberg <[email protected]>
…HTMLParser (GH-22658) (GH-133844) When calling .close() the HTMLParser should flush all remaining content, even when that content is in an unclosed script or style tag. (cherry picked from commit 53383e9) Co-authored-by: Waylan Limberg <[email protected]>
Uh oh!
There was an error while loading. Please reload this page.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
Linked PRs
The text was updated successfully, but these errors were encountered: