]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.9] gh-102555: Fix comment parsing in HTMLParser according to the HTML5 standard...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 12 Jul 2025 12:24:14 +0000 (14:24 +0200)
committerGitHub <noreply@github.com>
Sat, 12 Jul 2025 12:24:14 +0000 (14:24 +0200)
commita63f2294b7c24097a8b9ea52477220f8eb070b0d
tree4d980e744e38f80fd2a4944a199ee1c683eed3e6
parent8d1b3dfa09135affbbf27fb8babcf3c11415df49
[3.9] gh-102555: Fix comment parsing in HTMLParser according to the HTML5 standard (GH-135664) (GH-136276)

* "--!>" now ends the comment.
* "-- >" no longer ends the comment.
* Support abnormally ended empty comments "<-->" and "<--->".

---------
(cherry picked from commit 8ac7613dc8b8f82253d7c0e2b6ef6ed703a0a1ee)

Co-author: Kerim Kabirov <the.privat33r+gh@pm.me>

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Lib/html/parser.py
Lib/test/test_htmlparser.py
Misc/NEWS.d/next/Security/2025-06-18-13-28-08.gh-issue-102555.nADrzJ.rst [new file with mode: 0644]