Closed messense closed 5 years ago
Thanks for the suggestion. A couple of thoughts:
Changed to use xml.sax.saxutils.escape
instead of html.escape
since it exists on both Python 2 & 3.
Note that in Python 3.8 cgi.escape
has been removed, so fixing this is required to support 3.8.
Also, why not:
try:
from html import escape as html_escape
except ImportError:
from cgi import escape as html_escape
Python 3.8 support should be fixed in the latest version. Thanks for the pull request!
Ref: Escaping HTML on Python wiki.