-
-
Notifications
You must be signed in to change notification settings - Fork 33.3k
Closed
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or errortype-securityA security issueA security issue
Description
Bug report
HTMLParser initially only supported RAWTEXT elements "style" and "script". Then support of RCDATA elements "title" and "textarea" was added in #118350. But there are more RAWTEXT elements: "xmp", "iframe", "noembed", and "noframes".
"noscript" is also switches to the RAWTEXT mode if the scripting flag is enabled.
And the "plaintext" tag switches to the PLAINTEXT state from which there is no exit.
Support of other RAWTEXT elements can be enabled from the user code by adding them to HTMLParser.CDATA_CONTENT_ELEMENTS (this can be done for separate HTMLParser instance), but it would be better to support them by default. "plaintext" needs a special code.
Linked PRs
- gh-137836: Support more RAWTEXT and PLAINTEXT elements in HTMLParser #137837
- [3.14] gh-137836: Support more RAWTEXT and PLAINTEXT elements in HTMLParser (GH-137837) #140841
- [3.13] gh-137836: Support more RAWTEXT and PLAINTEXT elements in HTMLParser (GH-137837) #140842
- [3.12] gh-137836: Support more RAWTEXT and PLAINTEXT elements in HTMLParser (GH-137837) (GH-140842) #140850
- [3.10] gh-137836: Support more RAWTEXT and PLAINTEXT elements in HTMLParser (GH-137837) (GH-140842) #140853
- [3.9] gh-137836: Support more RAWTEXT and PLAINTEXT elements in HTMLParser (GH-137837) (GH-140842) #140857
- [3.13] Fix the versionchanged directive for gh-137836 #140859
- [3.11] gh-137836: Support more RAWTEXT and PLAINTEXT elements in HTMLParser (GH-137837) (GH-140842) #140852
Metadata
Metadata
Assignees
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or errortype-securityA security issueA security issue
Projects
Status
Done