def convert_charref(self, name):
try:<EOL><INDENT>n = int(name)<EOL><DEDENT>except ValueError:<EOL><INDENT>return<EOL><DEDENT>if not <NUM_LIT:0> <= n <= <NUM_LIT> : <EOL><INDENT>return<EOL><DEDENT>return self.convert_codepoint(n)<EOL>
This method fixes a bug in Python's SGMLParser.