summaryrefslogtreecommitdiffstats
path: root/Lib/html
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2014-02-01 19:22:26 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2014-02-01 19:22:26 (GMT)
commit153d97b24e7253f344860094eb2c98ed93657720 (patch)
tree9256d843a13b443631941b250ee4362fbbcb2ab8 /Lib/html
parent145dff856713d5db6984e2cd888f5f2e5a9904bc (diff)
parentf27b9a741ac7771aa1f6c1219d86a61222fdc20a (diff)
downloadcpython-153d97b24e7253f344860094eb2c98ed93657720.zip
cpython-153d97b24e7253f344860094eb2c98ed93657720.tar.gz
cpython-153d97b24e7253f344860094eb2c98ed93657720.tar.bz2
#20288: merge with 3.3.
Diffstat (limited to 'Lib/html')
-rw-r--r--Lib/html/parser.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/html/parser.py b/Lib/html/parser.py
index 12c28b8..a650d5e 100644
--- a/Lib/html/parser.py
+++ b/Lib/html/parser.py
@@ -264,9 +264,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)
+ if ";" in rawdata[i:]: # bail by consuming &#
+ self.handle_data(rawdata[i:i+2])
+ i = self.updatepos(i, i+2)
break
elif startswith('&', i):
match = entityref.match(rawdata, i)