cpython/Misc/NEWS.d/next/Security/2025-06-18-13-28-08.gh-issue-102555.nADrzJ.rst
Miss Islington (bot) 85766db07e
[3.10] gh-102555: Fix comment parsing in HTMLParser according to the HTML5 standard (GH-135664) (GH-136275)
* "--!>" now ends the comment.
* "-- >" no longer ends the comment.
* Support abnormally ended empty comments "<-->" and "<--->".

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


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>
2025-07-12 14:24:27 +02:00

3 lines
220 B
ReStructuredText

Fix comment parsing in :class:`html.parser.HTMLParser` according to the
HTML5 standard. ``--!>`` now ends the comment. ``-- >`` no longer ends the
comment. Support abnormally ended empty comments ``<-->`` and ``<--->``.