Fix for an Issue #142

This commit is contained in:
Miroslav Stampar 2012-08-08 14:21:13 +02:00
parent 432b567584
commit 5fc1e8bc12

View File

@ -241,6 +241,8 @@ def unescape_charref(data, encoding):
name, base = data, 10
if name.startswith("x"):
name, base= name[1:], 16
elif not name.isdigit():
base = 16
uc = unichr(int(name, base))
if encoding is None:
return uc