Implementing Issue #111

This commit is contained in:
Miroslav Stampar
2012-07-23 15:14:52 +02:00
parent 6809449e31
commit ab9cb80602
2 changed files with 3 additions and 2 deletions

View File

@@ -144,5 +144,4 @@ def htmlunescape(value):
if value and isinstance(value, basestring):
codes = (('&lt;', '<'), ('&gt;', '>'), ('&quot;', '"'), ('&nbsp;', ' '), ('&amp;', '&'))
retVal = reduce(lambda x, y: x.replace(y[0], y[1]), codes, retVal)
retVal = re.sub('&#(\d+);', lambda x: getUnicode(chr(x.group(1))), retVal)
return retVal