SIGN IN SIGN UP

[3.12] gh-135661: Fix CDATA section parsing in HTMLParser (GH-135665) (#137774)

"] ]>" 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 0cbbfc462119b9107b373c24d2bda5a1271bed36)
S
Serhiy Storchaka committed
dcf24768c918c41821cda6fe6a1aa20ce26545dd
Parent: ade85bc
Committed by GitHub <noreply@github.com> on 10/6/2025, 2:06:29 PM