- GRAYBYTE UNDETECTABLE CODES -

403Webshell
Server IP : 184.154.167.98  /  Your IP : 3.139.70.243
Web Server : Apache
System : Linux pink.dnsnetservice.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
User : puertode ( 1767)
PHP Version : 8.2.26
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python3.6/site-packages/html5lib/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3.6/site-packages/html5lib/__pycache__/serializer.cpython-36.pyc
3

B;�WU7�@s�ddlmZmZmZddlmZddlZddlmZm	Z	ddl
mZmZm
Z
ddl
mZmZmZddlmZmZdd	lmZd
je
�dZejded
�Zejded�ZiZed�dkZx�eej��D]p\Z Z!er�ee!�dks�er�ee!�dkr�q�e!dkr�ee!�dk�rej"e!�Z!ne#e!�Z!e!ek�s4e j$�r�e ee!<q�Wdd�Z%ede%�ddd�Z&Gdd�de'�Z(Gdd�de)�Z*dS)�)�absolute_import�division�unicode_literals)�	text_typeN)�register_error�xmlcharrefreplace_errors�)�voidElements�booleanAttributes�spaceCharacters)�rcdataElements�entities�xmlEntities)�treewalkers�_utils)�escape�z"'=<>`�[�]u_	

 /`  ᠎᠏           

   ]u􏿿��&c
Cs"t|ttf��rg}g}d}x�t|j|j|j��D]n\}}|rFd}q4||j}tj|j|t	|j|dg���r�tj
|j||d��}d}nt|�}|j|�q4Wx^|D]V}t
j|�}	|	r�|jd�|j|	�|	jd�s�|jd�q�|jdt|�dd��q�Wdj|�|jfSt|�SdS)NFrTr�;z&#x%s;r)�
isinstance�UnicodeEncodeError�UnicodeTranslateError�	enumerate�object�start�endrZisSurrogatePair�min�surrogatePairToCodepoint�ord�append�_encode_entity_map�get�endswith�hex�joinr)
�exc�resZ
codepoints�skip�i�c�indexZ	codepointZcp�e�r/� /usr/lib/python3.6/serializer.py�htmlentityreplace_errors*s0 
"




r1�htmlentityreplace�etreecKs$tj|�}tf|�}|j||�|�S)N)rZ
getTreeWalker�HTMLSerializer�render)�inputZtree�encodingZserializer_optsZwalker�sr/r/r0�	serializeJs

r9c@s~eZdZdZdZdZdZdZdZdZ	dZ
dZdZdZ
dZdZdZd!Zdd�Zdd�Zdd�Zd"dd�Zd#dd�Zd$dd �ZdS)%r4�legacy�"TF�quote_attr_values�
quote_char�use_best_quote_char�omit_optional_tags�minimize_boolean_attributes�use_trailing_solidus�space_before_trailing_solidus�escape_lt_in_attrs�
escape_rcdata�resolve_entities�alphabetical_attributes�inject_meta_charset�strip_whitespace�sanitizec	Kszt|�t|j�}t|�dkr2tdtt|����d|kr@d|_x(|jD]}t|||j|t	||���qHWg|_
d|_dS)a6	Initialize HTMLSerializer.

        Keyword options (default given first unless specified) include:

        inject_meta_charset=True|False
          Whether it insert a meta element to define the character set of the
          document.
        quote_attr_values="legacy"|"spec"|"always"
          Whether to quote attribute values that don't require quoting
          per legacy browser behaviour, when required by the standard, or always.
        quote_char=u'"'|u"'"
          Use given quote character for attribute quoting. Default is to
          use double quote unless attribute value contains a double quote,
          in which case single quotes are used instead.
        escape_lt_in_attrs=False|True
          Whether to escape < in attribute values.
        escape_rcdata=False|True
          Whether to escape characters that need to be escaped within normal
          elements within rcdata elements such as style.
        resolve_entities=True|False
          Whether to resolve named character entities that appear in the
          source tree. The XML predefined entities &lt; &gt; &amp; &quot; &apos;
          are unaffected by this setting.
        strip_whitespace=False|True
          Whether to remove semantically meaningless whitespace. (This
          compresses all whitespace to a single space except within pre.)
        minimize_boolean_attributes=True|False
          Shortens boolean attributes to give just the attribute value,
          for example <input disabled="disabled"> becomes <input disabled>.
        use_trailing_solidus=False|True
          Includes a close-tag slash at the end of the start tag of void
          elements (empty elements whose end tag is forbidden). E.g. <hr/>.
        space_before_trailing_solidus=True|False
          Places a space immediately before the closing slash in a tag
          using a trailing solidus. E.g. <hr />. Requires use_trailing_solidus.
        sanitize=False|True
          Strip all unsafe or unknown constructs from output.
          See `html5lib user documentation`_
        omit_optional_tags=True|False
          Omit start/end tags that are optional.
        alphabetical_attributes=False|True
          Reorder attributes to be in alphabetical order.

        .. _html5lib user documentation: http://code.google.com/p/html5lib/wiki/UserDocumentation
        rz2__init__() got an unexpected keyword argument '%s'r=FN)�	frozenset�options�len�	TypeError�next�iterr>�setattrr$�getattr�errors�strict)�self�kwargsZunexpected_args�attrr/r/r0�__init__ps.zHTMLSerializer.__init__cCs*t|t�st�|jr"|j|jd�S|SdS)Nr2)rr�AssertionErrorr7�encode)rT�stringr/r/r0rY�szHTMLSerializer.encodecCs*t|t�st�|jr"|j|jd�S|SdS)NrS)rrrXr7rY)rTrZr/r/r0�encodeStrict�szHTMLSerializer.encodeStrictNccs�||_d}g|_|r0|jr0ddlm}|||�}|jrJddlm}||�}|jrdddlm}||�}|j	r~ddl
m}||�}|jr�ddlm}||�}�xR|D�]H}|d}|dk�r`d|d}|dr�|d	|d7}n|d
r�|d7}|d
�rJ|d
j
d�d
k�r0|d
j
d�d
k�r*|jd�d}nd}|d||d
|f7}|d7}|j|�Vq�|d5k�r�|dk�sz|�r�|�r�|dj
d�d
k�r�|jd�|j|d�Vn|jt|d��Vq�|d6k�r�|d}	|jd|	�V|	tk�r|j�rd}n|�r|jd��x�|dj�D�]�\\}
}}|}
|}|jd�V|j|
�V|j�s�|
tj|	t��k�r"|
tjdt��k�r"|jd�V|jdk�s�t|�d
k�r�d}n@|jd k�r�tj|�dk	}n$|jd!k�r�tj|�dk	}ntd"��|jd#d$�}|j �r|jd%d&�}|�r�|j!}|j"�rTd|k�r<d|k�r<d}nd|k�rTd|k�rTd}|dk�rl|jdd'�}n|jdd(�}|j|�V|j|�V|j|�Vn|j|�V�q"W|	t#k�r�|j$�r�|j%�r�|jd)�Vn|jd*�V|jd�Vq�|d+k�r6|d}	|	tk�rd}n|�r$|jd�|jd,|	�Vq�|d-k�rx|d}|j
d.�d
k�rb|jd/�|jd0|d�Vq�|d1k�r�|d}	|	d2}|t&k�r�|jd3|	�|j'�r�|t(k�r�t&|}nd4|	}|j|�Vq�|j|d�q�WdS)7NFr)�Filter�typeZDoctypez<!DOCTYPE %s�nameZpublicIdz PUBLIC "%s"ZsystemIdz SYSTEMr;r�'zASystem identifer contains both single and double quote charactersz %s%s%s�>�
Characters�SpaceCharacters�dataz</zUnexpected </ in CDATA�StartTag�EmptyTagz<%sTz+Unexpected child element of a CDATA element� r�=�always�specr:z?quote_attr_values must be one of: 'always', 'spec', or 'legacy'rz&amp;�<z&lt;z&#39;z&quot;z /�/ZEndTagz</%s>�Commentz--zComment contains --z	<!--%s-->ZEntityrzEntity %s not recognizedz&%s;)rarb)rdre))r7rRrGZfilters.inject_meta_charsetr\rFZfilters.alphabeticalattributesrHZfilters.whitespacerIZfilters.sanitizerr?Zfilters.optionaltags�find�serializeErrorr[rYrrrD�itemsr@r
r$�tupler<rL�_quoteAttributeSpec�search�_quoteAttributeLegacy�
ValueError�replacerCr=r>r	rArBr
rEr)rT�
treewalkerr7Zin_cdatar\�tokenr]Zdoctyper=r^�_Z	attr_nameZ
attr_value�k�vZ
quote_attrrc�keyr/r/r0r9�s�


















zHTMLSerializer.serializecCs2|rdjt|j||���Sdjt|j|���SdS)N�r)r'�listr9)rTrvr7r/r/r0r5?szHTMLSerializer.render�XXX ERROR MESSAGE NEEDEDcCs|jj|�|jrt�dS)N)rRr"rS�SerializeError)rTrcr/r/r0rnEszHTMLSerializer.serializeError)r<r=r>r?r@rArBrCrDrErFrGrHrI)N)N)r~)�__name__�
__module__�__qualname__r<r=r>r?r@rArBrCrDrErFrGrHrIrKrWrYr[r9r5rnr/r/r/r0r4Qs68


r4c@seZdZdZdS)rzError in serialized treeN)r�r�r��__doc__r/r/r/r0rLsr)r3N)+Z
__future__rrrZsixr�re�codecsrrZ	constantsr	r
rrr
rrrrZxml.sax.saxutilsrr'Z_quoteAttributeSpecChars�compilerqrsr#rLZ_is_ucs4r}roryrzr r!�islowerr1r9rr4�	Exceptionrr/r/r/r0�<module>s:
	

|

Youez - 2016 - github.com/yon3zu
LinuXploit