zmc
2023-10-12 ed135d79df12a2466b52dae1a82326941211dcc9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
U
Þ=®dðã@sTddlZddlmZejedœdd„Zejejedœdd„Zejedœd    d
„Z    dS) éNé)ÚMarkup)ÚsÚreturncCsJt|dƒrt| ¡ƒStt|ƒ dd¡ dd¡ dd¡ dd    ¡ d
d ¡ƒS) a¾Replace the characters ``&``, ``<``, ``>``, ``'``, and ``"`` in
    the string with HTML-safe sequences. Use this if you need to display
    text that might contain such characters in HTML.
 
    If the object has an ``__html__`` method, it is called and the
    return value is assumed to already be safe for HTML.
 
    :param s: An object to be converted to a string and escaped.
    :return: A :class:`Markup` string with the escaped text.
    Ú__html__ú&z&amp;ú>z&gt;ú<z&lt;ú'z&#39;ú"z&#34;)ÚhasattrrrÚstrÚreplace©r©rúId:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\markupsafe/_native.pyÚescapes(
 ÿþýüûÿrcCs|dkrtƒSt|ƒS)aLike :func:`escape` but treats ``None`` as the empty string.
    Useful with optional values, as otherwise you get the string
    ``'None'`` when the value is ``None``.
 
    >>> escape(None)
    Markup('None')
    >>> escape_silent(None)
    Markup('')
    N)rrrrrrÚ escape_silents
rcCst|tƒst|ƒS|S)a¨Convert an object to a string if it isn't already. This preserves
    a :class:`Markup` string rather than converting it back to a basic
    string, so it will still be marked as safe and won't be escaped
    again.
 
    >>> value = escape("<User 1>")
    >>> value
    Markup('&lt;User 1&gt;')
    >>> escape(str(value))
    Markup('&amp;lt;User 1&amp;gt;')
    >>> escape(soft_str(value))
    Markup('&lt;User 1&gt;')
    )Ú
isinstancer rrrrÚsoft_str.s
r)
ÚtypingÚtÚrÚAnyrÚOptionalrr rrrrrÚ<module>s