Index: Lib/HTMLParser.py
===================================================================
--- Lib/HTMLParser.py (revision 80555)
+++ Lib/HTMLParser.py (working copy)
@@ -175,6 +175,9 @@
i = self.updatepos(i, k)
continue
else:
+ if ";" in rawdata[i:]: #bail by consuming
+ self.handle_data(rawdata[0:2])
+ i = self.updatepos(i, 2)
break
elif startswith('&', i):
match = entityref.match(rawdata, i)
Index: Lib/test/test_htmlparser.py
===================================================================
--- Lib/test/test_htmlparser.py (revision 80555)
+++ Lib/test/test_htmlparser.py (working copy)
@@ -114,6 +114,7 @@
sample
text
“
+bad;