HEX
Server: LiteSpeed
System: Linux standart9.isimtescil.net 3.10.0-962.3.2.lve1.5.26.7.el7.x86_64 #1 SMP Wed Oct 2 07:53:12 EDT 2019 x86_64
User: karalev (5310)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: //proc/self/root/opt/alt/python27/lib/python2.7/site-packages/mako/filters.pyo
�
�ǚPc@s�ddlZddlZddlZddlZddlmZddlmZidd6dd6dd	6d
d6dd
6Zejd�Z	d�Z
yddlZejZ
Wnek
r�e
Z
nXd�Zd�Zd�Zd�Zdefd��YZe�Zejd�Zd�Zdefd��YZeejej�ZejZejZd�Z ej!de �i	dd6dd6d d!6d"d#6d$d%6d&d&6d'd'6d(d(6d)d)6Z"ej#r�e"j$id(d&6�ne"j%�Z&d*e&d<dS(+i����N(tStringIO(tutils&amp;t&s&gt;t>s&lt;t<s&#34;t"s&#39;t's
([&<"\'>])cCstjd�|�S(s(legacy HTML escape for non-unicode mode.cSst|j�S(N(txml_escapestgroup(tm((s=/opt/alt/python27/lib/python2.7/site-packages/mako/filters.pyt<lambda>s(tLEGACY_HTML_ESCAPE_REtsub(tstring((s=/opt/alt/python27/lib/python2.7/site-packages/mako/filters.pytlegacy_html_escapescCstjdd�|�S(Ns
([&<"\'>])cSst|j�S(N(RR(R	((s=/opt/alt/python27/lib/python2.7/site-packages/mako/filters.pyR
&s(treR(R
((s=/opt/alt/python27/lib/python2.7/site-packages/mako/filters.pyt
xml_escape%scCs|jd�}tj|�S(Ntutf8(tencodeturllibt
quote_plus(R
((s=/opt/alt/python27/lib/python2.7/site-packages/mako/filters.pyt
url_escape(scCs1tj|�}t|�s-|jd�}n|S(NR(Rtunquote_plustis_ascii_strtdecode(R
ttext((s=/opt/alt/python27/lib/python2.7/site-packages/mako/filters.pyturl_unescape-scCs
|j�S(N(tstrip(R
((s=/opt/alt/python27/lib/python2.7/site-packages/mako/filters.pyttrim3stDecodecBseZd�ZRS(cs�fd�}|S(NcsLt|t�r|St|t�s8tt|�d��St|d��SdS(Ntencoding(t
isinstancetunicodetstr(tx(tkey(s=/opt/alt/python27/lib/python2.7/site-packages/mako/filters.pyR9s
((tselfR#R((R#s=/opt/alt/python27/lib/python2.7/site-packages/mako/filters.pyt__getattr__8s(t__name__t
__module__R%(((s=/opt/alt/python27/lib/python2.7/site-packages/mako/filters.pyR7ss\A[\x00-\x7f]*\ZcCst|t�otj|�S(N(RR!t	_ASCII_retmatch(R((s=/opt/alt/python27/lib/python2.7/site-packages/mako/filters.pyRFstXMLEntityEscapercBsieZd�Zd�Zd�Zejd�Zd�Zejdej	ej
B�Zd�Zd�Z
RS(cCsEtg|j�D]\}}|d|f^q�|_||_dS(Nu&%s;(tdictt	iteritemstcodepoint2entitytname2codepoint(R$tcodepoint2nameR.tctn((s=/opt/alt/python27/lib/python2.7/site-packages/mako/filters.pyt__init__Ls2cCst|�j|j�S(s�Replace characters with their character entity references.

        Only characters corresponding to a named entity are replaced.
        (R t	translateR-(R$R((s=/opt/alt/python27/lib/python2.7/site-packages/mako/filters.pytescape_entitiesQscCsDt|j��}y|j|SWnttfk
r?d|SXdS(Ns&#x%X;(tordRR-tKeyErrort
IndexError(R$R	t	codepoint((s=/opt/alt/python27/lib/python2.7/site-packages/mako/filters.pyt__escapeXs
s["&<>]|[^\x00-\x7f]cCs%|jj|jt|��jd�S(s3Replace characters with their character references.

        Replace characters by their named entity references.
        Non-ASCII characters, if they do not have a named entity reference,
        are replaced by numerical character references.

        The return value is guaranteed to be ASCII.
        tascii(t_XMLEntityEscaper__escapableRt_XMLEntityEscaper__escapeR R(R$R((s=/opt/alt/python27/lib/python2.7/site-packages/mako/filters.pytescapebs	s�& (?:
                                          \#(\d+)
                                          | \#x([\da-f]+)
                                          | ( (?!\d) [:\w] [-.:\w]+ )
                                          ) ;cCsw|j�\}}}|r*t|�}n-|rBt|d�}n|jj|d�}|dkrmt|�St|�S(Nii��i�(tgroupstintR.tgettchrtunichr(R$R	tdvalthvaltnameR8((s=/opt/alt/python27/lib/python2.7/site-packages/mako/filters.pyt
__unescapeys
cCs|jj|j|�S(s�Unescape character references.

        All character references (both entity references and numerical
        character references) are unescaped.
        (t _XMLEntityEscaper__characterrefsRt_XMLEntityEscaper__unescape(R$R((s=/opt/alt/python27/lib/python2.7/site-packages/mako/filters.pytunescape�s(R&R'R2R4R<RtcompileR;R=tXtUNICODERGRHRI(((s=/opt/alt/python27/lib/python2.7/site-packages/mako/filters.pyR*Ks					
cCsQt|t�rG|j|j|j!}tj|�}t|�|jfS|�dS(s4An 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 \u20ac12.'.encode('latin1', 'htmlentityreplace')
    'The cost was &euro;12.'
    N(RtUnicodeEncodeErrortobjecttstarttendt_html_entities_escaperR=R (textbad_textR((s=/opt/alt/python27/lib/python2.7/site-packages/mako/filters.pythtmlentityreplace_errors�s

thtmlentityreplacesfilters.xml_escapeR"sfilters.html_escapethsfilters.url_escapetusfilters.trimRsfilters.html_entities_escapetentityR RR!R1sfilters.legacy_html_escape('RRthtmlentitydefstcodecsRtmakoRRRJRRt
markupsafeR=thtml_escapetImportErrorRRRRRNRRR(RR*R/R.RQR4thtml_entities_escapeRIthtml_entities_unescapeRTtregister_errortDEFAULT_ESCAPEStpy3ktupdatetcopytNON_UNICODE_ESCAPES(((s=/opt/alt/python27/lib/python2.7/site-packages/mako/filters.pyt<module>sZ0
	


				
		D