About Converting HTML Entities to Unicode

HTML entities ( , ©, €, etc.) coming from rich text editors and external import feeds are not appropriate for plain-text emails, APIs, data exports to JSON, XLS, PDF and other formats. Convert them to Unicode characters in this way:

1
2
from html import unescape
text = unescape(html)

Tips and Tricks Programming Development Python 3