Roundup Robot added the comment:
New changeset df79735b21c1 by Christian Heimes in branch '3.3':
Issue #18347: ElementTree's html serializer now preserves the case of closing
tags.
http://hg.python.org/cpython/rev/df79735b21c1
New changeset d5536c06a082 by Christian Heimes in branch 'default':
Changes by Christian Heimes li...@cheimes.de:
--
resolution: - fixed
stage: needs patch - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18347
___
Serhiy Storchaka added the comment:
LGTM. Please add a reference to this issue in the test.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18347
___
New submission from Adam Urban:
import xml.etree.ElementTree as ET
tree = ET.parse(myinput.xml)
tree.write(myoutput.xml, encoding=utf-16le, xml_declaration=False,
default_namespace=None, method=html)
If the source XML has a tag like this:
someTagsomeData/someTag
ElementTree will output it
Christian Heimes added the comment:
I'm able to confirm the issue for Python 2.7 and 3.x:
import xml.etree.ElementTree as ET
tree = ET.fromstring(someTagsomeData/someTag)
ET.tostring(tree, encoding=utf-8, method=html)
b'someTagsomeData/sometag'
--
nosy: +christian.heimes
stage: -
Christian Heimes added the comment:
Attached fix with unit test
The HTML serializer has a line tag = tag.lower() and used the lower tag to
write the end tag.
--
keywords: +patch
Added file: http://bugs.python.org/file30752/18347_taglower.patch
___