Is sgmllib.py 's BUG?

limodou chatme at 263.net
Thu Oct 18 01:43:03 EDT 2001


Sometimes I use python to analyse a HTML document. But I found that if
there is a tag start with '<!' not '<!--', sgmllib with treat it as a
'special' pattern. It'll be ok mostly, occasionaly failed. Because
sometimes someone can use tag '<!' for comment. I fix it by treat all
'<!' as comment, but this will lost declaration like DOCTYPE. Anyone
has some ideas?



More information about the Python-list mailing list