module documentation

Taken from Python 3.4 standard library. Conforms to its original license.

General functions for HTML manipulation.

Function escape No summary
Function unescape No summary
Function ​_replace​_charref Undocumented
Variable ​_charref Undocumented
Variable ​_invalid​_charrefs Undocumented
Variable ​_invalid​_codepoints Undocumented
def escape(s, quote=True):
Replace special characters "&", "<" and ">" to HTML-safe sequences. If the optional flag quote is true (the default), the quotation mark characters, both double quote (") and single quote (') characters are also translated.
def unescape(s):
Convert all named and numeric character references (e.g. &gt;, &#62;, &x3e;) in the string s to the corresponding unicode characters. This function uses the rules defined by the HTML 5 standard for both valid and invalid character references, and the list of HTML 5 named character references defined in html.entities.html5.
def _replace_charref(s):

Undocumented

_charref =

Undocumented

_invalid_charrefs: dict[int, str] =

Undocumented

_invalid_codepoints: set[int] =

Undocumented