Commit 0b792d80 authored by Guido van Rossum's avatar Guido van Rossum

Oops. Fix two bugs in the handling of character and entity

references, introduced by the line number / offset code.
parent c69e95ff
......@@ -174,7 +174,7 @@ class SGMLParser:
name = match.group(1)
self.handle_charref(name)
k = match.end(0)
if rawdata[i-1] != ';':
if rawdata[k-1] != ';':
k = k-1
i = self.updatepos(i, k)
continue
......@@ -183,7 +183,7 @@ class SGMLParser:
name = match.group(1)
self.handle_entityref(name)
k = match.end(0)
if rawdata[i-1] != ';':
if rawdata[k-1] != ';':
k = k-1
i = self.updatepos(i, k)
continue
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment