cpython/Lib/html
Miss Islington (bot) 22d5724fbb
Some checks failed
Lint / lint (push) Has been cancelled
Tests / Check for source changes (push) Has been cancelled
Tests / Docs (push) Has been cancelled
Tests / Check if the ABI has changed (push) Has been cancelled
Tests / Check if generated files are up to date (push) Has been cancelled
Tests / Windows (push) Has been cancelled
Tests / macOS (push) Has been cancelled
Tests / Ubuntu (push) Has been cancelled
Tests / Ubuntu SSL tests with OpenSSL (push) Has been cancelled
Tests / Address sanitizer (push) Has been cancelled
Tests / All required checks pass (push) Has been cancelled
[3.11] gh-135661: Fix CDATA section parsing in HTMLParser (GH-135665) (GH-137774) (GH-139659)
"] ]>" 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>
2025-10-07 14:05:06 +02:00
..
__init__.py [3.11] gh-100210: Correct the comment link for unescaping HTML (GH-100212) (#102044) 2023-02-21 07:52:02 +08:00
entities.py Add source for character mappings (#92014) 2022-05-06 12:28:09 +02:00
parser.py [3.11] gh-135661: Fix CDATA section parsing in HTMLParser (GH-135665) (GH-137774) (GH-139659) 2025-10-07 14:05:06 +02:00