Updated sgmllib
I wrote about a sgmllib problem a few days ago. I still may be a dolt and my code certainly needed fixing, but the bug remained nevertheless.
Hence I’ve made some small changes to sgmllib that fix problems I’ve had. New version, which passes all unit tests included in Python distribution, can be found here and I’d really appreciate if users of sgmllib could give it a go (that includes users of htmllib and BeautifulSoup).
Update: As suggested I’ve added an updated version of test_sgmllib.py, which includes an example where the old library fails and new one doesn’t.
Update 2 : It seems this is valid, even required SGML behavior.