Skip to content

[3.15] gh-135661: Fix abrupt closing of empty comment in HTMLParser (GH-153007)#153024

Merged
serhiy-storchaka merged 1 commit into
python:3.15from
miss-islington:backport-ed370d3-3.15
Jul 4, 2026
Merged

[3.15] gh-135661: Fix abrupt closing of empty comment in HTMLParser (GH-153007)#153024
serhiy-storchaka merged 1 commit into
python:3.15from
miss-islington:backport-ed370d3-3.15

Conversation

@miss-islington

@miss-islington miss-islington commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

An abruptly closed empty comment ("" or "") no longer extends
up to a later "-->" in the same feed() call.

test_htmlparser now also feeds each string source as a single chunk, in
addition to one character at a time, to exercise different input buffering.
(cherry picked from commit ed370d3)

Co-authored-by: Serhiy Storchaka storchaka@gmail.com
Co-authored-by: Claude Opus 4.8 noreply@anthropic.com

…ythonGH-153007)

An abruptly closed empty comment ("<!-->" or "<!--->") no longer extends
up to a later "-->" in the same feed() call.

test_htmlparser now also feeds each string source as a single chunk, in
addition to one character at a time, to exercise different input buffering.
(cherry picked from commit ed370d3337c1ac4f7295b444a4807c0b72287608)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
@bedevere-app bedevere-app Bot added the type-security A security issue label Jul 4, 2026
@serhiy-storchaka serhiy-storchaka enabled auto-merge (squash) July 4, 2026 12:06
@serhiy-storchaka serhiy-storchaka merged commit fdc17ca into python:3.15 Jul 4, 2026
60 checks passed
@miss-islington miss-islington deleted the backport-ed370d3-3.15 branch July 4, 2026 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type-security A security issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants