
Hello,
Where's the lxml issue tracker? I couldn't find it?
Void elements are html tags that don't need a closing tag. <br> is a well known example:
from lxml.builder import E html.tostring(E.br())
'<br>'
etree.tostring(E.br())
'<br/>'
<p> is not a void element, so:
html.tostring(E.p())
'<p></p>'
etree.tostring(E.p())
'<p/>'
see the full list:
http://www.w3.org/TR/html5/syntax.html#elements-0
While working on etree.htmlfile, I noticed that the following tags are not treated as void:
embed, keygen, source, track, wbr
see: https://github.com/lxml/lxml/pull/142#issuecomment-55588559
because of this, lxml can produce invalid html.
once this issue is resolved, the tuple at:
https://github.com/lxml/lxml/commit/c039e03798d84ac3f897354f0780f15346da1361...
needs to be updated.
best, burak