classification
Title: ElementTree HTML serialization incorrect for ,
Type: behavior Stage: resolved
Components: Library (Lib), XML Versions: Python 3.2, Python 3.3, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: ezio.melotti Nosy List: Joshua.Biagio, ezio.melotti, python-dev
Priority: normal Keywords:

Created on 2012-09-19 03:46 by Joshua.Biagio, last changed 2012-09-19 05:29 by ezio.melotti. This issue is now closed.

Messages (3)
msg170699 - (view) Author: Joshua Biagio (Joshua.Biagio) Date: 2012-09-19 03:46
There seems to be a very minor bug in the ElementTree.py file, for the so-called 'empty' elements that are serialized without a closing tag. The HTML_EMPTY tuple/set is used to lookup these tags.

In the Lib/xml/etree/ElementTree.py file, the HTML_EMPTY tuple is created like:

HTML_EMPTY = ("area", "base", "basefont", "br", "col", "frame", "hr",
              "img", "input", "isindex", "link", "meta" "param")

There is a missing comma between "meta" and "param". I'm not sure if this is intended behavior.

The line should be replaced with:

HTML_EMPTY = ("area", "base", "basefont", "br", "col", "frame", "hr",
              "img", "input", "isindex", "link", "meta", "param")
msg170701 - (view) Author: Roundup Robot (python-dev) Date: 2012-09-19 05:26
New changeset 3498ffd3cdee by Ezio Melotti in branch '2.7':
#15970: xml.etree.ElementTree now serializes correctly the empty HTML elements "meta" and "param".
http://hg.python.org/cpython/rev/3498ffd3cdee

New changeset 17c528cff63f by Ezio Melotti in branch '3.2':
#15970: xml.etree.ElementTree now serializes correctly the empty HTML elements "meta" and "param".
http://hg.python.org/cpython/rev/17c528cff63f

New changeset 19c74cadea95 by Ezio Melotti in branch 'default':
#15970: merge with 3.2.
http://hg.python.org/cpython/rev/19c74cadea95
msg170702 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2012-09-19 05:29
Fixed, thanks for the report!
History
Date User Action Args
2012-09-19 05:29:08ezio.melottisetstatus: open -> closed

type: behavior
assignee: ezio.melotti
versions: - Python 2.6, Python 3.1
nosy: + ezio.melotti

messages: + msg170702
resolution: fixed
stage: resolved
2012-09-19 05:26:06python-devsetnosy: + python-dev
messages: + msg170701
2012-09-19 03:46:19Joshua.Biagiocreate