]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-86155: Fix data loss after unclosed script or style tag in HTMLParser (GH-22658)
authorWaylan Limberg <waylan.limberg@icloud.com>
Sat, 10 May 2025 17:36:06 +0000 (13:36 -0400)
committerGitHub <noreply@github.com>
Sat, 10 May 2025 17:36:06 +0000 (17:36 +0000)
commit53383e90e4df7029f792b7aa81aa2e4cff348ed0
treed065c58c1e64620d25dea34de81649bfe7f0929d
parent7dddb4e667b5eb76cbe11755051ec139b0f437a9
gh-86155: Fix data loss after unclosed script or style tag in HTMLParser (GH-22658)

When calling .close() the HTMLParser should flush all remaining content,
even when that content is in an unclosed script or style tag.
Lib/html/parser.py
Lib/test/test_htmlparser.py
Misc/NEWS.d/next/Library/2023-02-13-21-41-34.gh-issue-86155.ppIGSC.rst [new file with mode: 0644]