Fix entity removal to recoginize hex correctly.

This commit is contained in:
Jim Miller 2012-02-13 19:39:09 -06:00
parent af65982c9a
commit ed004e8637

View file

@ -27,7 +27,7 @@ def _unirepl(match):
return unichr(value)
def _replaceNumberEntities(data):
p = re.compile(r'&#(x?)(\d+);')
p = re.compile(r'&#(x?)([0-9a-fA-F]+);')
return p.sub(_unirepl, data)
def _replaceNotEntities(data):