]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.14] 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 18:02:23 +0000 (20:02 +0200)
committerGitHub <noreply@github.com>
Sat, 10 May 2025 18:02:23 +0000 (18:02 +0000)
commite7e105f51b4ea4087a3bbd87c445aaff0124d4a6
treec6b4e4fce2adba3c0e47f215aec16af156839f1c
parent856e5903babcc78dca8eba4feb2ce6aebdc60e6c
[3.14] gh-86155: Fix data loss after unclosed script or style tag in 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 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]