diff options
Diffstat (limited to 'Lib/HTMLParser.py')
-rw-r--r-- | Lib/HTMLParser.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/HTMLParser.py b/Lib/HTMLParser.py index b6a26d3..f0e520c 100644 --- a/Lib/HTMLParser.py +++ b/Lib/HTMLParser.py @@ -370,7 +370,7 @@ class HTMLParser(markupbase.ParserBase): c = int(s[1:], 16) else: c = int(s) - return unichr(c) + return chr(c) else: # Cannot use name2codepoint directly, because HTMLParser supports apos, # which is not part of HTML 4 @@ -378,7 +378,7 @@ class HTMLParser(markupbase.ParserBase): if HTMLParser.entitydefs is None: entitydefs = HTMLParser.entitydefs = {'apos':"'"} for k, v in htmlentitydefs.name2codepoint.items(): - entitydefs[k] = unichr(v) + entitydefs[k] = chr(v) try: return self.entitydefs[s] except KeyError: |