https://t.me/AnonymousX5
Server : Apache
System : Linux cvar2.toservers.com 3.10.0-962.3.2.lve1.5.73.el7.x86_64 #1 SMP Wed Aug 24 21:31:23 UTC 2022 x86_64
User : njnconst ( 1116)
PHP Version : 8.4.18
Disable Function : NONE
Directory :  /usr/lib64/python2.7/site-packages/markupsafe/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/lib64/python2.7/site-packages/markupsafe/__init__.pyc
�
./�_c@s�dZddlZddlZddlmZddlmZddlmZddlmZddlmZdd	lm	Z	dd
lm
Z
dZdd
ddgZej
d�Zej
d�Zde	fd��YZdefd��YZee	d�rdejfd��YZnd�Zdefd��YZy ddlmZmZmZWn-ek
r�ddlmZmZmZnXes�eZejd�ndS(s�
markupsafe
~~~~~~~~~~

Implements an escape function and a Markup string to replace HTML
special characters with safe representations.

:copyright: 2010 Pallets
:license: BSD-3-Clause
i����Ni(t	int_types(t	iteritems(tMapping(tPY2(tstring_types(t	text_type(tunichrs1.1.1tMarkuptsoft_unicodetescapet
escape_silents(<!--.*?-->|<[^>]*>)s&([^& ;]+);cBsXeZdZd'Zdd(dd�Zd�Zd�Zd�Zd�Z	e	Z
d�Zd	�Zd
�Z
ej
je
_d�Zejje_d�Zejje_d
�Zejje_d�Zd�Zed��Zd�Zx!d)D]Zee�e�e<q�Wd"�Zd#�Zd$�Zd%�Zeed&�rPed&�Zn[[RS(*s�A string that is ready to be safely inserted into an HTML or XML
    document, either because it was escaped or because it was marked
    safe.

    Passing an object to the constructor converts it to text and wraps
    it to mark it safe without escaping. To escape the text, use the
    :meth:`escape` class method instead.

    >>> Markup('Hello, <em>World</em>!')
    Markup('Hello, <em>World</em>!')
    >>> Markup(42)
    Markup('42')
    >>> Markup.escape('Hello, <em>World</em>!')
    Markup('Hello &lt;em&gt;World&lt;/em&gt;!')

    This implements the ``__html__()`` interface that some frameworks
    use. Passing an object that implements ``__html__()`` will wrap the
    output of that method, marking it safe.

    >>> class Foo:
    ...     def __html__(self):
    ...         return '<a href="/foo">foo</a>'
    ...
    >>> Markup(Foo())
    Markup('<a href="/foo">foo</a>')

    This is a subclass of the text type (``str`` in Python 3,
    ``unicode`` in Python 2). It has the same methods as that type, but
    all methods escape their arguments and return a ``Markup`` instance.

    >>> Markup('<em>%s</em>') % 'foo & bar'
    Markup('<em>foo &amp; bar</em>')
    >>> Markup('<em>Hello</em> ') + '<foo>'
    Markup('<em>Hello</em> &lt;foo&gt;')
    utstrictcCsPt|d�r|j�}n|dkr:tj||�Stj||||�S(Nt__html__(thasattrRtNoneRt__new__(tclstbasetencodingterrors((s9/tmp/pip-install-sTXtzD/MarkupSafe/markupsafe/__init__.pyRFs
cCs|S(N((tself((s9/tmp/pip-install-sTXtzD/MarkupSafe/markupsafe/__init__.pyRMscCsJt|t�st|d�rF|jtt|�j|j|���StS(NR(	t
isinstanceRR
t	__class__tsuperRt__add__R	tNotImplemented(Rtother((s9/tmp/pip-install-sTXtzD/MarkupSafe/markupsafe/__init__.pyRPs(cCs8t|d�st|t�r4|j|�j|�StS(NR(R
RRR	RR(RR((s9/tmp/pip-install-sTXtzD/MarkupSafe/markupsafe/__init__.pyt__radd__UscCs,t|t�r(|jtj||��StS(N(RRRRt__mul__R(Rtnum((s9/tmp/pip-install-sTXtzD/MarkupSafe/markupsafe/__init__.pyRZscsYt|t�r.t�fd�|D��}nt|�j�}�jtj�|��S(Nc3s!|]}t|�j�VqdS(N(t_MarkupEscapeHelperR	(t.0tx(R(s9/tmp/pip-install-sTXtzD/MarkupSafe/markupsafe/__init__.pys	<genexpr>cs(RttupleRR	RRt__mod__(Rtarg((Rs9/tmp/pip-install-sTXtzD/MarkupSafe/markupsafe/__init__.pyR"ascCsd|jjtj|�fS(Ns%s(%s)(Rt__name__Rt__repr__(R((s9/tmp/pip-install-sTXtzD/MarkupSafe/markupsafe/__init__.pyR%hscCs%|jtj|t|j|���S(N(RRtjointmapR	(Rtseq((s9/tmp/pip-install-sTXtzD/MarkupSafe/markupsafe/__init__.pyR&kscOs%tt|jtj|||���S(N(tlistR'RRtsplit(Rtargstkwargs((s9/tmp/pip-install-sTXtzD/MarkupSafe/markupsafe/__init__.pyR*pscOs%tt|jtj|||���S(N(R)R'RRtrsplit(RR+R,((s9/tmp/pip-install-sTXtzD/MarkupSafe/markupsafe/__init__.pyR-uscOs%tt|jtj|||���S(N(R)R'RRt
splitlines(RR+R,((s9/tmp/pip-install-sTXtzD/MarkupSafe/markupsafe/__init__.pyR.zscs5ddlm��fd�}tj|t|��S(s�Convert escaped markup back into a text string. This replaces
        HTML entities with the characters they represent.

        >>> Markup('Main &raquo; <em>About</em>').unescape()
        'Main » <em>About</em>'
        i(t
HTML_ENTITIEScs�|jd�}|�kr)t�|�SyN|d dkrStt|dd��S|jd�rvtt|d��SWntk
r�nX|j�S(Niis#xs#Xit#(s#xs#X(tgroupRtintt
startswitht
ValueError(tmtname(R/(s9/tmp/pip-install-sTXtzD/MarkupSafe/markupsafe/__init__.pythandle_match�s
(t
_constantsR/t
_entity_retsubR(RR7((R/s9/tmp/pip-install-sTXtzD/MarkupSafe/markupsafe/__init__.pytunescapescCs1djtjd|�j��}t|�j�S(s�:meth:`unescape` the markup, remove tags, and normalize
        whitespace to single spaces.

        >>> Markup('Main &raquo;	<em>About</em>').striptags()
        'Main » About'
        u t(R&t
_striptags_reR:R*RR;(Rtstripped((s9/tmp/pip-install-sTXtzD/MarkupSafe/markupsafe/__init__.pyt	striptags�s!cCs)t|�}|j|k	r%||�S|S(stEscape a string. Calls :func:`escape` and ensures that for
        subclasses the correct type is returned.
        (R	R(Rtstrv((s9/tmp/pip-install-sTXtzD/MarkupSafe/markupsafe/__init__.pyR	�s
cs:tt|���fd�}�j|_�j|_|S(NcsStt|�t|�|j�}t|t|�|j�|j�|||��S(N(t_escape_argspecR)t	enumerateR	RR(RR+R,(torig(s9/tmp/pip-install-sTXtzD/MarkupSafe/markupsafe/__init__.pytfunc�s!(tgetattrRR$t__doc__(R6RE((RDs9/tmp/pip-install-sTXtzD/MarkupSafe/markupsafe/__init__.pytmake_simple_escaping_wrapper�s
t__getitem__t
capitalizettitletlowertuppertreplacetljusttrjusttlstriptrstriptcentertstript	translatet
expandtabstswapcasetzfillcCs+tt|jtj||j|����S(N(R!R'RRt	partitionR	(Rtsep((s9/tmp/pip-install-sTXtzD/MarkupSafe/markupsafe/__init__.pyRY�scCs+tt|jtj||j|����S(N(R!R'RRt
rpartitionR	(RRZ((s9/tmp/pip-install-sTXtzD/MarkupSafe/markupsafe/__init__.pyR[�scOs:t|j�}t||�}|j|j|||��S(N(tEscapeFormatterR	t_MagicFormatMappingRtvformat(RR+R,t	formatter((s9/tmp/pip-install-sTXtzD/MarkupSafe/markupsafe/__init__.pytformat�scCs|rtd��n|S(Ns,Unsupported format specification for Markup.(R4(Rtformat_spec((s9/tmp/pip-install-sTXtzD/MarkupSafe/markupsafe/__init__.pyt__html_format__�st__getslice__(N(s__getitem__s
capitalizestitleslowersuppersreplacesljustsrjustslstripsrstripscentersstrips	translates
expandtabssswapcaseszfill(R$t
__module__RGt	__slots__RRRRRRt__rmul__R"R%R&RR*R-R.R;R?tclassmethodR	RHtmethodtlocalsRYR[R`RbR
Rc(((s9/tmp/pip-install-sTXtzD/MarkupSafe/markupsafe/__init__.pyRs^#												

	
				R]cBs2eZdZd�Zd�Zd�Zd�ZRS(s�This class implements a dummy wrapper to fix a bug in the Python
    standard library for string formatting.

    See http://bugs.python.org/issue13598 for information about why
    this is necessary.
    cCs||_||_d|_dS(Ni(t_argst_kwargst_last_index(RR+R,((s9/tmp/pip-install-sTXtzD/MarkupSafe/markupsafe/__init__.pyt__init__�s		cCsa|dkrV|j}|jd7_y|j|SWntk
rFnXt|�}n|j|S(NR<i(RlRjtLookupErrortstrRk(Rtkeytidx((s9/tmp/pip-install-sTXtzD/MarkupSafe/markupsafe/__init__.pyRI�s	
cCs
t|j�S(N(titerRk(R((s9/tmp/pip-install-sTXtzD/MarkupSafe/markupsafe/__init__.pyt__iter__�scCs
t|j�S(N(tlenRk(R((s9/tmp/pip-install-sTXtzD/MarkupSafe/markupsafe/__init__.pyt__len__�s(R$RdRGRmRIRsRu(((s9/tmp/pip-install-sTXtzD/MarkupSafe/markupsafe/__init__.pyR]�s
			R`R\cBseZd�Zd�ZRS(cCs
||_dS(N(R	(RR	((s9/tmp/pip-install-sTXtzD/MarkupSafe/markupsafe/__init__.pyRmscCs�t|d�r!|j|�}nct|d�rf|rWtdj|t|����n|j�}ntjj||t	|��}t	|j
|��S(NRbRs�Format specifier {0} given, but {1} does not define __html_format__. A class that defines __html__ must define __html_format__ to work with format specifiers.(R
RbR4R`ttypeRtstringt	Formattertformat_fieldRR	(RtvalueRaRA((s9/tmp/pip-install-sTXtzD/MarkupSafe/markupsafe/__init__.pyRys(R$RdRmRy(((s9/tmp/pip-install-sTXtzD/MarkupSafe/markupsafe/__init__.pyR\s	cCsLxE|D]=\}}t|d�s1t|t�r||�||<qqW|S(s,Helper for various string-wrapped functions.R(R
RR(tobjtiterableR	RpRz((s9/tmp/pip-install-sTXtzD/MarkupSafe/markupsafe/__init__.pyRBsRcBsJeZdZd�Zd�Zd�ZeZd�Zd�Zd�Z	RS(sHelper for Markup.__mod__cCs||_||_dS(N(R{R	(RR{R	((s9/tmp/pip-install-sTXtzD/MarkupSafe/markupsafe/__init__.pyRm(s	cCst|j||j�S(N(RR{R	(Rtitem((s9/tmp/pip-install-sTXtzD/MarkupSafe/markupsafe/__init__.pyRI,scCst|j|j��S(N(RR	R{(R((s9/tmp/pip-install-sTXtzD/MarkupSafe/markupsafe/__init__.pyt__str__/scCst|jt|j���S(N(RoR	treprR{(R((s9/tmp/pip-install-sTXtzD/MarkupSafe/markupsafe/__init__.pyR%4scCs
t|j�S(N(R2R{(R((s9/tmp/pip-install-sTXtzD/MarkupSafe/markupsafe/__init__.pyt__int__7scCs
t|j�S(N(tfloatR{(R((s9/tmp/pip-install-sTXtzD/MarkupSafe/markupsafe/__init__.pyt	__float__:s(
R$RdRGRmRIR~t__unicode__R%R�R�(((s9/tmp/pip-install-sTXtzD/MarkupSafe/markupsafe/__init__.pyR%s					(R	R
Rtsoft_str( RGtreRwt_compatRRRRRRRt__version__t__all__tcompileR=R9RR]R
RxR\RBtobjectRt	_speedupsR	R
RtImportErrort_nativeR�tappend(((s9/tmp/pip-install-sTXtzD/MarkupSafe/markupsafe/__init__.pyt<module>s4�	 
 

https://t.me/AnonymousX5 - 2025