Skip to content

gh-118350: Fix support of elements "textarea" and "title" in HTMLParser #135310

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

timonviola
Copy link
Contributor

@timonviola timonviola commented Jun 9, 2025

This is a PR where comments and tests are implemented based on feedback from the draft PR: #121770

@serhiy-storchaka
Copy link
Member

There are more fundamental issues in HTMLParser (see #135661). I'll review this PR after fixing them.

@serhiy-storchaka serhiy-storchaka self-assigned this Jun 25, 2025
@serhiy-storchaka
Copy link
Member

There were more fundamental issues in HTMLParser (see #135661). Now many of them are fixed, and the rest should not conflict with this PR. Please update the PR. Tests for style and script were rewritten, so please make tests for title and textarea similar to them.

@serhiy-storchaka
Copy link
Member

There were some errors in the implementations -- it was not able to find the closing tag and did not work with convert_charrefs=True. I fixed this and refactored the code and the tests.

This issue is now classified as a security issue, like many other HTMLParser issues.

@serhiy-storchaka serhiy-storchaka added type-security A security issue needs backport to 3.9 only security fixes needs backport to 3.10 only security fixes needs backport to 3.11 only security fixes needs backport to 3.12 only security fixes needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes labels Jul 14, 2025
@serhiy-storchaka serhiy-storchaka changed the title gh-118350: Add escapable-raw-text to CDATA mode gh-118350: Fix support of elements "textarea" and "title" in HTMLParser Jul 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting review needs backport to 3.9 only security fixes needs backport to 3.10 only security fixes needs backport to 3.11 only security fixes needs backport to 3.12 only security fixes needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes type-security A security issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants