import html.parser
html_parser = html.parser.HTMLParser()
unescaped = html_parser.unescape(my_string)
import html.parser
html_parser = html.parser.HTMLParser()
unescaped = html_parser.unescape(my_string)
How do I perform HTML decoding/encoding using Python/Django?