cpython/Lib/html
Miss Islington (bot) ed904d5bbf
[3.9] gh-135661: Fix CDATA section parsing in HTMLParser (GH-135665) (GH-137774) (GH-139661)
"] ]>" and "]] >" no longer end the CDATA section.

Make CDATA section parsing  context depending.
Add private method HTMLParser._set_support_cdata() to change the context.
If called with True, "<[CDATA[" starts a CDATA section which ends with "]]>".
If called with False, "<[CDATA[" starts a bogus comments which ends with ">".
(cherry picked from commit 0cbbfc4621)
(cherry picked from commit dcf24768c9)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2025-10-07 21:15:04 +02:00
..
__init__.py #2927: Added the unescape() function to the html module. 2013-11-19 20:28:45 +02:00
entities.py Add source for character mappings (GH-92014) (#92388) 2022-05-06 12:58:10 +02:00
parser.py [3.9] gh-135661: Fix CDATA section parsing in HTMLParser (GH-135665) (GH-137774) (GH-139661) 2025-10-07 21:15:04 +02:00