File manager - Edit - /usr/local/CyberPanel/lib/python3.10/site-packages/tornado/__pycache__/escape.cpython-310.pyc
Back
o �h�7 � @ s� d Z ddlZddlZddlZddlZddlmZ ddlZddlm Z m Z mZmZm Z mZ de eef defdd�Zde eef defd d �Zde defdd�Zde eef de fd d�Zdedefdd�Zd9de eef dedefdd�Zejd9de eef dddedefdd��Zej d:de eef dededefdd��Z d:de eef dee dede eef fdd�Z d;de eef dededeee e f fdd �Zeed�fZejdedefd!d"��Zejdedefd#d"��Zejd<d$d"��Zde deef dee fd%d"�Zeed�fZejdedefd&d'��Zejdedefd(d'��Zejd<d)d'��Zde deef dee fd*d'�ZeZ eZ!eZ"d+e de fd,d-�Z#e�$ed.��Z%dd/dd0d1gfd2e eef d3ed4e eeegef f d5ed6e e defd7d8�Z&dS )=a� Escaping/unescaping methods for HTML, JSON, URLs, and others. Also includes a few other miscellaneous string manipulation functions that have crept in over time. Many functions in this module have near-equivalents in the standard library (the differences mainly relate to handling of bytes and unicode strings, and were more relevant in Python 2). In new code, the standard library functions are encouraged instead of this module where applicable. See the docstrings on each function for details. � N)�unicode_type)�Union�Any�Optional�Dict�List�Callable�value�returnc C � t �t| ��S )a� Escapes a string so it is valid within HTML or XML. Escapes the characters ``<``, ``>``, ``"``, ``'``, and ``&``. When used in attribute values the escaped strings must be enclosed in quotes. Equivalent to `html.escape` except that this function always returns type `str` while `html.escape` returns `bytes` if its input is `bytes`. .. versionchanged:: 3.2 Added the single quote to the list of escaped characters. .. versionchanged:: 6.4 Now simply wraps `html.escape`. This is equivalent to the old behavior except that single quotes are now escaped as ``'`` instead of ``'`` and performance may be different. )�html�escape� to_unicode�r � r �D/usr/local/CyberPanel/lib/python3.10/site-packages/tornado/escape.py�xhtml_escape'