summaryrefslogtreecommitdiffstats
path: root/Lib/html/parser.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/html/parser.py')
-rw-r--r--Lib/html/parser.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/html/parser.py b/Lib/html/parser.py
index 83a5825..c2c7f6b 100644
--- a/Lib/html/parser.py
+++ b/Lib/html/parser.py
@@ -175,6 +175,9 @@ class HTMLParser(_markupbase.ParserBase):
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)