adding decodeHtml, htmldecode deprecated

This commit is contained in:
Rolux 2008-05-01 00:03:38 +02:00
parent a883b62405
commit 57ccd45973

View file

@ -121,6 +121,9 @@ def cleanHtml(text):
# references, a hexadecimal numeric reference, or a named reference). # references, a hexadecimal numeric reference, or a named reference).
charrefpat = re.compile(r'&(#(\d+|x[\da-fA-F]+)|[\w.:-]+);?') charrefpat = re.compile(r'&(#(\d+|x[\da-fA-F]+)|[\w.:-]+);?')
def decodeHtml(html):
return htmldecode(text)
def htmldecode(text): def htmldecode(text):
"""Decode HTML entities in the given text.""" """Decode HTML entities in the given text."""
if type(text) != unicode: if type(text) != unicode: