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
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
__init__.cpython-36.opt-1.pyc | File | 11.05 KB | 0644 |
|
__init__.cpython-36.pyc | File | 11.05 KB | 0644 |
|
_compat.cpython-36.opt-1.pyc | File | 737 B | 0644 |
|
_compat.cpython-36.pyc | File | 737 B | 0644 |
|
_constants.cpython-36.opt-1.pyc | File | 4.2 KB | 0644 |
|
_constants.cpython-36.pyc | File | 4.2 KB | 0644 |
|
_native.cpython-36.opt-1.pyc | File | 1.34 KB | 0644 |
|
_native.cpython-36.pyc | File | 1.34 KB | 0644 |
|
tests.cpython-36.opt-1.pyc | File | 6.8 KB | 0644 |
|
tests.cpython-36.pyc | File | 7.88 KB | 0644 |
|