]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-102555: Fix comment parsing in HTMLParser according to the HTML5 standard (GH...
authorSerhiy Storchaka <storchaka@gmail.com>
Fri, 4 Jul 2025 07:00:23 +0000 (10:00 +0300)
committerGitHub <noreply@github.com>
Fri, 4 Jul 2025 07:00:23 +0000 (07:00 +0000)
commit8ac7613dc8b8f82253d7c0e2b6ef6ed703a0a1ee
tree20fcaba6c0eaa9a3d26ac8d6b2c0d3e0948dfeb1
parentb582d751b4968d4534fdb7894e50713676789b2f
gh-102555: Fix comment parsing in HTMLParser according to the HTML5 standard (GH-135664)

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

---------

Co-author: Kerim Kabirov <the.privat33r+gh@pm.me>
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]