Skip to content
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

(c)ElementTree can produce invalid XML #51848

Closed
jwilk mannequin opened this issue Dec 30, 2009 · 2 comments
Closed

(c)ElementTree can produce invalid XML #51848

jwilk mannequin opened this issue Dec 30, 2009 · 2 comments
Labels
stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@jwilk
Copy link
Mannequin

jwilk mannequin commented Dec 30, 2009

BPO 7599
Nosy @jwilk, @florentx
Superseder
  • bpo-5166: ElementTree and minidom don't prevent creation of not well-formed XML
  • 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 = <Date 2010-02-16.13:50:26.082>
    created_at = <Date 2009-12-30.14:01:34.116>
    labels = ['type-bug', 'library']
    title = '(c)ElementTree can produce invalid XML'
    updated_at = <Date 2010-02-16.13:50:26.080>
    user = 'https://github.com/jwilk'

    bugs.python.org fields:

    activity = <Date 2010-02-16.13:50:26.080>
    actor = 'flox'
    assignee = 'none'
    closed = True
    closed_date = <Date 2010-02-16.13:50:26.082>
    closer = 'flox'
    components = ['Library (Lib)']
    creation = <Date 2009-12-30.14:01:34.116>
    creator = 'jwilk'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 7599
    keywords = []
    message_count = 2.0
    messages = ['97032', '99408']
    nosy_count = 2.0
    nosy_names = ['jwilk', 'flox']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = None
    status = 'closed'
    superseder = '5166'
    type = 'behavior'
    url = 'https://bugs.python.org/issue7599'
    versions = ['Python 2.6', 'Python 2.5']

    @jwilk
    Copy link
    Mannequin Author

    jwilk mannequin commented Dec 30, 2009

    $ cat buggy.py 
    import sys
    from xml.etree import ElementTree as et
    root = et.Element('root')
    root.text = u'\x07'
    et.ElementTree(root).write(sys.stdout)
    
    $ python buggy.py | xmllint -
    -:1: parser error : PCDATA invalid Char value 7
    <root></root>
          ^

    @jwilk jwilk mannequin added stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels Dec 30, 2009
    @florentx
    Copy link
    Mannequin

    florentx mannequin commented Feb 16, 2010

    Duplicate of bpo-5166.

    @florentx florentx mannequin closed this as completed Feb 16, 2010
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    0 participants