mirror of
https://github.com/python/cpython.git
synced 2026-02-05 09:25:35 +00:00
#12888: merge with 3.2.
This commit is contained in:
commit
6a8c8a80a1
4 changed files with 7 additions and 2 deletions
|
|
@ -458,4 +458,4 @@ def replaceEntities(s):
|
|||
return '&'+s+';'
|
||||
|
||||
return re.sub(r"&(#?[xX]?(?:[0-9a-fA-F]+|\w{1,8}));",
|
||||
replaceEntities, s, re.ASCII)
|
||||
replaceEntities, s, flags=re.ASCII)
|
||||
|
|
|
|||
|
|
@ -377,7 +377,8 @@ def test_unescape_function(self):
|
|||
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)
|
||||
|
|
|
|||
|
|
@ -704,6 +704,7 @@ Douglas Orr
|
|||
Michele Orrù
|
||||
Oleg Oshmyan
|
||||
Denis S. Otkidach
|
||||
Peter Otten
|
||||
Michael Otteneder
|
||||
R. M. Oudkerk
|
||||
Russel Owen
|
||||
|
|
|
|||
|
|
@ -271,6 +271,9 @@ Core and Builtins
|
|||
Library
|
||||
-------
|
||||
|
||||
- Issue #12888: Fix a bug in HTMLParser.unescape that prevented it to escape
|
||||
more than 128 entities. Patch by Peter Otten.
|
||||
|
||||
- Issue #12878: Expose a __dict__ attribute on io.IOBase and its subclasses.
|
||||
|
||||
- Issue #12636: IDLE reads the coding cookie when executing a Python script.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue