File: //usr/lib64/python3.6/site-packages/markupsafe/__pycache__/_native.cpython-36.opt-1.pyc
3
2a�Q� � @ s8 d Z ddlmZ ddlmZ dd� Zdd� Zdd � Zd
S )z�
markupsafe._native
~~~~~~~~~~~~~~~~~~
Native Python implementation the C module is not compiled.
:copyright: (c) 2010 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
� )�Markup)� text_typec C sF t | d�r| j� S tt| �jdd�jdd�jdd�jdd �jd
d��S )z�Convert the characters &, <, >, ' and " in string s to HTML-safe
sequences. Use this if you need to display text that might contain
such characters in HTML. Marks return value as markup string.
�__html__�&z&�>z>�<z<�'z'�"z")�hasattrr r r �replace)�s� r
�/usr/lib64/python3.6/_native.py�escape s
r c C s | dkrt � S t| �S )zMLike :func:`escape` but converts `None` into an empty
markup string.
N)r r )r r
r
r �
escape_silent s r c C s t | t�st| �} | S )zoMake a string unicode if it isn't already. That way a markup
string is not converted back to unicode.
)�
isinstancer )r r
r
r �soft_unicode( s
r N)�__doc__Z
markupsafer Zmarkupsafe._compatr r r r r
r
r
r �<module>
s