This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: (c)ElementTree can produce invalid XML
Type: behavior Stage:
Components: Library (Lib) Versions: Python 2.6, Python 2.5
process
Status: closed Resolution: duplicate
Dependencies: Superseder: ElementTree and minidom don't prevent creation of not well-formed XML
View: 5166
Assigned To: Nosy List: flox, jwilk
Priority: normal Keywords:

Created on 2009-12-30 14:01 by jwilk, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg97032 - (view) Author: Jakub Wilk (jwilk) Date: 2009-12-30 14:01
$ 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>
      ^
msg99408 - (view) Author: Florent Xicluna (flox) * (Python committer) Date: 2010-02-16 13:50
Duplicate of #5166.
History
Date User Action Args
2022-04-11 14:56:55adminsetgithub: 51848
2010-02-16 13:50:26floxsetstatus: open -> closed

nosy: + flox
messages: + msg99408

superseder: ElementTree and minidom don't prevent creation of not well-formed XML
resolution: duplicate
2009-12-30 14:01:34jwilkcreate