
Burak Arslan schrieb am 30.09.2014 um 10:32:
On 09/30/14 11:20, Stefan Behnel wrote:
So, what you're saying is that even
with xf.element('meta', ...): pass
should write an opening and a closing tag?
yes.
I don't really have a preference here, so the current way of working (i.e. the above) is ok with me.
You'd then write
with xf.element('meta', ...): pass
which isn't really worse than
xf.write(etree.Element('meta', ...))
That's another inconsistency, because the latter would still serialise some self-closing elements with closing tags.
Which ones? How come? I'm testing every single one of them here:
https://github.com/lxml/lxml/blob/f8bdb7d48b5cf4403aa6bbbf10f5f8da6a4a510e/s...
Yes, and you put a comment there that said:
""" # FIXME: These don't get serialized as void elements. """
Ah, sure :) So am I supposed to file a bug in https://bugzilla.gnome.org/buglist.cgi?product=libxml2 ?
There are almost 2000 open issues there, that's scary.
Yes. It usually helps to write the patch yourself and send it to the mailing list instead. :)
Should be easy in this case, as the functionality is already there, so it's most likely just about extending a list somewhere in the HTML code.
Stefan