D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
thread-self
/
root
/
usr
/
lib64
/
python3.6
/
site-packages
/
markupsafe
/
Filename :
_native.py
back
Copy
# -*- coding: utf-8 -*- """ markupsafe._native ~~~~~~~~~~~~~~~~~~ Native Python implementation the C module is not compiled. :copyright: (c) 2010 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from markupsafe import Markup from markupsafe._compat import text_type def escape(s): """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. """ if hasattr(s, '__html__'): return s.__html__() return Markup(text_type(s) .replace('&', '&') .replace('>', '>') .replace('<', '<') .replace("'", ''') .replace('"', '"') ) def escape_silent(s): """Like :func:`escape` but converts `None` into an empty markup string. """ if s is None: return Markup() return escape(s) def soft_unicode(s): """Make a string unicode if it isn't already. That way a markup string is not converted back to unicode. """ if not isinstance(s, text_type): s = text_type(s) return s
Name
Size
Last Modified
Owner
Permissions
Actions
__pycache__
Dir
July 28 2023 2:57:36
root
0755
__init__.py
10.096
KB
May 08 2014 2:52:34
root
0644
_compat.py
0.552
KB
April 17 2014 9:01:00
root
0644
_constants.py
4.683
KB
May 20 2013 4:08:35
root
0644
_native.py
1.159
KB
May 20 2013 5:45:22
root
0644
_speedups.cpython-36m-x86_64-linux-gnu.so
12
KB
November 13 2019 7:22:38
root
0755
tests.py
5.964
KB
May 08 2014 2:58:28
root
0644
2017 © D7net | D704T team