File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -462,11 +462,12 @@ def replaceEntities(s):
462462 else :
463463 # Cannot use name2codepoint directly, because HTMLParser supports apos,
464464 # which is not part of HTML 4
465- import htmlentitydefs
466465 if HTMLParser .entitydefs is None :
467- entitydefs = HTMLParser .entitydefs = {'apos' :u"'" }
466+ import htmlentitydefs
467+ entitydefs = {'apos' :u"'" }
468468 for k , v in htmlentitydefs .name2codepoint .iteritems ():
469469 entitydefs [k ] = unichr (v )
470+ HTMLParser .entitydefs = entitydefs
470471 try :
471472 return self .entitydefs [s ]
472473 except KeyError :
Original file line number Diff line number Diff line change @@ -42,6 +42,8 @@ Extension Modules
4242Library
4343-------
4444
45+ - bpo-30011: Fixed race condition in HTMLParser.unescape().
46+
4547- bpo-30068: _io._IOBase.readlines will check if it's closed first when
4648 hint is present.
4749
You can’t perform that action at this time.
0 commit comments