mirror of
https://github.com/python/cpython.git
synced 2025-08-22 17:55:18 +00:00
#12888: Fix a bug in HTMLParser.unescape that prevented it to escape more than 128 entities. Patch by Peter Otten.
This commit is contained in:
parent
73abc24345
commit
d9e0b068af
4 changed files with 7 additions and 2 deletions
|
@ -377,7 +377,8 @@ class HTMLParserTolerantTestCase(TestCaseBase):
|
|||
p = html.parser.HTMLParser()
|
||||
self.assertEqual(p.unescape('&#bad;'),'&#bad;')
|
||||
self.assertEqual(p.unescape('&'),'&')
|
||||
|
||||
# see #12888
|
||||
self.assertEqual(p.unescape('{ ' * 1050), '{ ' * 1050)
|
||||
|
||||
def test_main():
|
||||
support.run_unittest(HTMLParserTestCase, HTMLParserTolerantTestCase)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue