Skip to content

Fix ElementTree serialization to HTML #149489

@serhiy-storchaka

Description

@serhiy-storchaka

Bug report

There are several bugs which prevent generation of correct HTML:

  • Comment and "processing instruction" content should not be escaped. Similar bug was fixed for XML in ElementTree ProcessingInstruction uses character entities in content #46995.
  • There are more elements besides <script> and <style> whose content should not be escaped.
  • <plaintext> does not have the closing tag, and its content should not be escaped.
  • Empty attributes (with value None) are not supported.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.13bugs and security fixes3.14bugs and security fixesstdlibStandard Library Python modules in the Lib/ directorytopic-XMLtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions