Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
6a8c8a80
Commit
6a8c8a80
authored
Sep 05, 2011
by
Ezio Melotti
Browse files
Options
Browse Files
Download
Plain Diff
#12888: merge with 3.2.
parents
2c2d2aed
d9e0b068
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
2 deletions
+7
-2
Lib/html/parser.py
Lib/html/parser.py
+1
-1
Lib/test/test_htmlparser.py
Lib/test/test_htmlparser.py
+2
-1
Misc/ACKS
Misc/ACKS
+1
-0
Misc/NEWS
Misc/NEWS
+3
-0
No files found.
Lib/html/parser.py
View file @
6a8c8a80
...
@@ -458,4 +458,4 @@ class HTMLParser(_markupbase.ParserBase):
...
@@ -458,4 +458,4 @@ class HTMLParser(_markupbase.ParserBase):
return
'&'
+
s
+
';'
return
'&'
+
s
+
';'
return
re
.
sub
(
r"&(#?[xX]?(?:[0-9a-fA-F]+|\
w{
1,8}));"
,
return
re
.
sub
(
r"&(#?[xX]?(?:[0-9a-fA-F]+|\
w{
1,8}));"
,
replaceEntities
,
s
,
re
.
ASCII
)
replaceEntities
,
s
,
flags
=
re
.
ASCII
)
Lib/test/test_htmlparser.py
View file @
6a8c8a80
...
@@ -377,7 +377,8 @@ class HTMLParserTolerantTestCase(TestCaseBase):
...
@@ -377,7 +377,8 @@ class HTMLParserTolerantTestCase(TestCaseBase):
p
=
html
.
parser
.
HTMLParser
()
p
=
html
.
parser
.
HTMLParser
()
self
.
assertEqual
(
p
.
unescape
(
'&#bad;'
),
'&#bad;'
)
self
.
assertEqual
(
p
.
unescape
(
'&#bad;'
),
'&#bad;'
)
self
.
assertEqual
(
p
.
unescape
(
'&'
),
'&'
)
self
.
assertEqual
(
p
.
unescape
(
'&'
),
'&'
)
# see #12888
self
.
assertEqual
(
p
.
unescape
(
'{ '
*
1050
),
'{ '
*
1050
)
def
test_main
():
def
test_main
():
support
.
run_unittest
(
HTMLParserTestCase
,
HTMLParserTolerantTestCase
)
support
.
run_unittest
(
HTMLParserTestCase
,
HTMLParserTolerantTestCase
)
...
...
Misc/ACKS
View file @
6a8c8a80
...
@@ -704,6 +704,7 @@ Douglas Orr
...
@@ -704,6 +704,7 @@ Douglas Orr
Michele Orrù
Michele Orrù
Oleg Oshmyan
Oleg Oshmyan
Denis S. Otkidach
Denis S. Otkidach
Peter Otten
Michael Otteneder
Michael Otteneder
R. M. Oudkerk
R. M. Oudkerk
Russel Owen
Russel Owen
...
...
Misc/NEWS
View file @
6a8c8a80
...
@@ -271,6 +271,9 @@ Core and Builtins
...
@@ -271,6 +271,9 @@ Core and Builtins
Library
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 #12878: Expose a __dict__ attribute on io.IOBase and its subclasses.
- Issue #12636: IDLE reads the coding cookie when executing a Python script.
- Issue #12636: IDLE reads the coding cookie when executing a Python script.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment