lxml can produce invalid XML

Bug #502967 reported by Matthias Klose
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lxml
Fix Released
Medium
scoder
lxml (Debian)
Fix Released
Unknown

Bug Description

$ cat buggy.py
import sys
import lxml.etree as et
root = et.Element('root')
root.text = u'''\u1234\x07'''
et.ElementTree(root).write(sys.stdout)

$ python buggy.py | xmllint -
-:1: parser error : PCDATA invalid Char value 7
<root>&#4660;</root>
             ^

Revision history for this message
scoder (scoder) wrote :
Changed in lxml:
assignee: nobody → Stefan Behnel (scoder)
importance: Undecided → Medium
status: New → Fix Committed
Changed in lxml (Debian):
status: Unknown → Confirmed
Revision history for this message
scoder (scoder) wrote :

Backported to 2.2 branch, to be released in 2.2.5.

Revision history for this message
scoder (scoder) wrote :

Fix released in lxml 2.2.5.

Changed in lxml:
status: Fix Committed → Fix Released
Changed in lxml (Debian):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.