Skip to content

xml.dom.minidom does not escape CR, LF and TAB characters within attribute values #50002

Closed
@Tomalak

Description

@Tomalak
mannequin
BPO 5752
Nosy @amauryfa, @devdanzin, @dvarrazzo, @ezio-melotti, @wking, @mitar, @moriyoshi
Files
  • minidom_test.py: A small test script that outlines the problem
  • test_toxml.py: New test script to demonstrate that the patch proposed works
  • test_multiline_roundtrip.diff: Tomalak's minidom_test.py as unittest, patch for test_minidom
  • minidom.patch: Proposed patch to minidom.py
  • minidom.diff: Old file before new file in patch.
  • minidom.py: monkey patch module applying minidom.diff
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None closed_at = None created_at = <Date 2009-04-14.11:13:06.464> labels = ['expert-XML', 'easy', 'type-bug'] title = 'xml.dom.minidom does not escape CR, LF and TAB characters within attribute values' updated_at = <Date 2019-06-22.20:28:40.662> user = 'https://bugs.python.org/Tomalak'

    bugs.python.org fields:

    activity = <Date 2019-06-22.20:28:40.662> actor = 'mitar' assignee = 'none' closed = False closed_date = None closer = None components = ['XML'] creation = <Date 2009-04-14.11:13:06.464> creator = 'Tomalak' dependencies = [] files = ['13921', '13960', '13966', '13977', '18184', '18325'] hgrepos = [] issue_num = 5752 keywords = ['patch', 'easy'] message_count = 33.0 messages = ['85964', '87178', '87332', '87333', '87351', '87429', '87431', '87432', '87526', '87527', '87528', '87564', '87586', '87590', '87604', '87609', '87676', '87679', '87681', '90548', '90676', '110999', '111493', '111642', '112497', '112570', '119728', '142964', '185398', '185408', '185419', '185423', '185576'] nosy_count = 13.0 nosy_names = ['effbot', 'amaury.forgeotdarc', 'ajaksu2', 'piro', 'ezio.melotti', 'sayap', 'Tomalak', 'devon', 'labrat', 'mitar', 'moriyoshi', 'gauges', 'Jens.Grivolla'] pr_nums = [] priority = 'normal' resolution = None stage = 'patch review' status = 'open' superseder = None type = 'behavior' url = 'https://bugs.python.org/issue5752' versions = ['Python 2.6', 'Python 3.1', 'Python 2.7', 'Python 3.2']

    Linked PRs

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      Projects

      No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions