New submission from Paweł:
from xml.dom import minidom
html = html
body
!-- img src=/images/obraz--super.jpg/ --
/body
/html
minidom.parseString(html)
Result:
Traceback (most recent call last):
File minidom.py, line 10, in module
minidom.parseString(html)
File
Ned Deily added the comment:
Thanks for your report. Alas, according to the W3C XML 1.0 specification:
For compatibility, the string -- (double-hyphen) MUST NOT occur within
comments.
So, it appears minidom (and other XML parsers) are correct in rejecting your
example as not well-formed