mirror of
https://github.com/python/cpython.git
synced 2025-08-23 10:16:01 +00:00
#17802: Fix an UnboundLocalError in html.parser. Initial tests by Thomas Barlow.
This commit is contained in:
parent
a771a1b48e
commit
8e596a765c
3 changed files with 18 additions and 0 deletions
|
@ -249,6 +249,7 @@ class HTMLParser(_markupbase.ParserBase):
|
|||
if self.strict:
|
||||
self.error("EOF in middle of entity or char ref")
|
||||
else:
|
||||
k = match.end()
|
||||
if k <= i:
|
||||
k = n
|
||||
i = self.updatepos(i, i + 1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue