module documentation

Undocumented

Constant DEFAULT​_ESCAPES Undocumented
Constant NON​_UNICODE​_ESCAPES Undocumented
Variable decode Undocumented
Variable xml​_escapes Undocumented
Class ​Decode Undocumented
Class ​XMLEntity​Escaper No class docstring; 0/2 instance variable, 0/2 class variable, 3/6 methods documented
Function htmlentityreplace​_errors An encoding error handler.
Function is​_ascii​_str Undocumented
Function legacy​_html​_escape legacy HTML escape for non-unicode mode.
Function legacy​_url​_escape Undocumented
Function trim Undocumented
Function url​_escape Undocumented
Function url​_unescape Undocumented
Function xml​_escape Undocumented
Variable _​ASCII_re Undocumented
Variable ​_html​_entities​_escaper Undocumented
DEFAULT_ESCAPES: dict[str, str] =

Undocumented

Value
{'x': 'filters.xml_escape',
 'h': 'filters.html_escape',
 'u': 'filters.url_escape',
 'trim': 'filters.trim',
 'entity': 'filters.html_entities_escape',
 'unicode': 'unicode',
 'decode': 'decode',
...
NON_UNICODE_ESCAPES =

Undocumented

Value
DEFAULT_ESCAPES.copy()
decode =

Undocumented

xml_escapes: dict[str, str] =

Undocumented

def htmlentityreplace_errors(ex):

An encoding error handler.

This python codecs error handler replaces unencodable characters with HTML entities, or, if no HTML entity exists for the character, XML character references:

>>> u'The cost was €12.'.encode('latin1', 'htmlentityreplace')
'The cost was €12.'
def is_ascii_str(text):

Undocumented

def legacy_html_escape(s):
legacy HTML escape for non-unicode mode.
def legacy_url_escape(string):

Undocumented

def trim(string):

Undocumented

def url_escape(string):

Undocumented

def url_unescape(string):

Undocumented

def xml_escape(string):

Undocumented

_ASCII_re =

Undocumented

_html_entities_escaper =

Undocumented