Function pymdtools::mistunege::escape

Function Documentation

pymdtools.mistunege.escape(text text, quote quote = False, smart_amp smart_amp = True)

Replace special characters "&", "<" and ">" to HTML-safe sequences.

The original cgi.escape will always escape "&", but you can control
this one for a smart escape amp.

:param quote: if set to True, " and ' will be escaped.
:param smart_amp: if set to False, & will always be escaped.