-
-
Notifications
You must be signed in to change notification settings - Fork 32.6k
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
Conversation
There are more fundamental issues in HTMLParser (see #135661). I'll review this PR after fixing them. |
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 |
There were some errors in the implementations -- it was not able to find the closing tag and did not work with This issue is now classified as a security issue, like many other HTMLParser issues. |
Thanks @timonviola for the PR, and @ambv for merging it 🌮🎉.. I'm working now to backport this PR to: 3.9, 3.10, 3.11, 3.12, 3.13, 3.14. |
…MLParser (pythonGH-135310) (cherry picked from commit 4d02f31) Co-authored-by: Timon Viola <44016238+timonviola@users.noreply.github.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Łukasz Langa <lukasz@langa.pl>
GH-136985 is a backport of this pull request to the 3.13 branch. |
Sorry, @timonviola and @ambv, I could not cleanly backport this to
|
GH-136986 is a backport of this pull request to the 3.12 branch. |
Sorry, @timonviola and @ambv, I could not cleanly backport this to
|
Sorry, @timonviola and @ambv, I could not cleanly backport this to
|
…" in HTMLParser (pythonGH-135310) (pythonGH-136986) (cherry picked from commit 4d02f31) Co-authored-by: Timon Viola <44016238+timonviola@users.noreply.github.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Łukasz Langa <lukasz@langa.pl> Signed-off-by: Michał Górny <mgorny@gentoo.org>
…MLParser (python#135310) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Backports for PR python/cpython#135310 were merged including 3.12 branch
Python 3.13.6 changed the way `<title>` tags are parsed: If there is no end tag, the rest of document is handled as title content. Source: python/cpython#135310 This change has also been backported to Python 3.12 but is not yet released. Example of a breaking test: https://github.com/zopefoundation/groktoolkit/actions/runs/16882111176/job/47820322945?pr=102 (Sorry I was not able to reproduce it here in the repository but I also saw it locally on 3.13.6)
Python 3.13.6 changed the way `<title>` tags are parsed: If there is no end tag, the rest of document is handled as title content. Source: python/cpython#135310 This change has also been backported to Python 3.12 but is not yet released. Example of a breaking test: https://github.com/zopefoundation/groktoolkit/actions/runs/16882111176/job/47820322945?pr=102 (Sorry I was not able to reproduce it here in the repository but I also saw it locally on 3.13.6) – The difference is that groktoolkit already uses uv (which already has 3.13.6) and zope.tal still relies on the Python versions provided by GitHub Actions (which does not yet have it.)
…" in HTMLParser (pythonGH-135310) (cherry picked from commit 4d02f31) Co-authored-by: Timon Viola <44016238+timonviola@users.noreply.github.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Łukasz Langa <lukasz@langa.pl>
GH-137782 is a backport of this pull request to the 3.11 branch. |
…" in HTMLParser (pythonGH-135310) (cherry picked from commit 4d02f31) Co-authored-by: Timon Viola <44016238+timonviola@users.noreply.github.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Łukasz Langa <lukasz@langa.pl>
GH-137783 is a backport of this pull request to the 3.10 branch. |
… in HTMLParser (pythonGH-135310) (cherry picked from commit 4d02f31) Co-authored-by: Timon Viola <44016238+timonviola@users.noreply.github.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Łukasz Langa <lukasz@langa.pl>
GH-137784 is a backport of this pull request to the 3.9 branch. |
This is a PR where comments and tests are implemented based on feedback from the draft PR: #121770