]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-86155: Fix data loss after unclosed script or style tag in HTMLParser ...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 10 May 2025 17:58:29 +0000 (19:58 +0200)
committerGitHub <noreply@github.com>
Sat, 10 May 2025 17:58:29 +0000 (17:58 +0000)
commite76ff560b015a585e185d9a21d3c18540c6b5fcd
tree0145e1d81ba50c552b5c5344c3eccf09c529a1ec
parent18501a11e0358130a6bc48fee339ba3892e9e191
[3.13] gh-86155: Fix data loss after unclosed script or style tag in 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 53383e90e4df7029f792b7aa81aa2e4cff348ed0)

Co-authored-by: Waylan Limberg <waylan.limberg@icloud.com>
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]