Your IP : 216.73.216.213
2a�Q� � @ sN d Z d d l m Z d d l m Z d d � Z d d � Z d d � Z d
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 se t | d � r | j � St t | � j d d � j d d � j d d � j d d � j d
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
�E/opt/alt/python35/lib64/python3.5/site-packages/markupsafe/_native.py�escape s
r c C s | d k r t � St | � 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 � s t | � } | 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__�
markupsafer Zmarkupsafe._compatr r r r r
r
r
r �<module>
s