def xhtml_escape(value):
    return _XHTML_ESCAPE_RE.sub(lambda match: _XHTML_ESCAPE_DICT[match.group(0)],
                                to_basestring(value))
Escapes a string so it is valid within HTML or XML.
dataset/ETHPy150Open limodou/uliweb/uliweb/core/template.py/xhtml_escape