]> jfr.im git - dlqueue.git/blame - venv/lib/python3.11/site-packages/MarkupSafe-2.1.3.dist-info/METADATA
init: venv aand flask
[dlqueue.git] / venv / lib / python3.11 / site-packages / MarkupSafe-2.1.3.dist-info / METADATA
CommitLineData
e0df8241
JR
1Metadata-Version: 2.1
2Name: MarkupSafe
3Version: 2.1.3
4Summary: Safely add untrusted strings to HTML/XML markup.
5Home-page: https://palletsprojects.com/p/markupsafe/
6Maintainer: Pallets
7Maintainer-email: contact@palletsprojects.com
8License: BSD-3-Clause
9Project-URL: Donate, https://palletsprojects.com/donate
10Project-URL: Documentation, https://markupsafe.palletsprojects.com/
11Project-URL: Changes, https://markupsafe.palletsprojects.com/changes/
12Project-URL: Source Code, https://github.com/pallets/markupsafe/
13Project-URL: Issue Tracker, https://github.com/pallets/markupsafe/issues/
14Project-URL: Chat, https://discord.gg/pallets
15Classifier: Development Status :: 5 - Production/Stable
16Classifier: Environment :: Web Environment
17Classifier: Intended Audience :: Developers
18Classifier: License :: OSI Approved :: BSD License
19Classifier: Operating System :: OS Independent
20Classifier: Programming Language :: Python
21Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
22Classifier: Topic :: Text Processing :: Markup :: HTML
23Requires-Python: >=3.7
24Description-Content-Type: text/x-rst
25License-File: LICENSE.rst
26
27MarkupSafe
28==========
29
30MarkupSafe implements a text object that escapes characters so it is
31safe to use in HTML and XML. Characters that have special meanings are
32replaced so that they display as the actual characters. This mitigates
33injection attacks, meaning untrusted user input can safely be displayed
34on a page.
35
36
37Installing
38----------
39
40Install and update using `pip`_:
41
42.. code-block:: text
43
44 pip install -U MarkupSafe
45
46.. _pip: https://pip.pypa.io/en/stable/getting-started/
47
48
49Examples
50--------
51
52.. code-block:: pycon
53
54 >>> from markupsafe import Markup, escape
55
56 >>> # escape replaces special characters and wraps in Markup
57 >>> escape("<script>alert(document.cookie);</script>")
58 Markup('&lt;script&gt;alert(document.cookie);&lt;/script&gt;')
59
60 >>> # wrap in Markup to mark text "safe" and prevent escaping
61 >>> Markup("<strong>Hello</strong>")
62 Markup('<strong>hello</strong>')
63
64 >>> escape(Markup("<strong>Hello</strong>"))
65 Markup('<strong>hello</strong>')
66
67 >>> # Markup is a str subclass
68 >>> # methods and operators escape their arguments
69 >>> template = Markup("Hello <em>{name}</em>")
70 >>> template.format(name='"World"')
71 Markup('Hello <em>&#34;World&#34;</em>')
72
73
74Donate
75------
76
77The Pallets organization develops and supports MarkupSafe and other
78popular packages. In order to grow the community of contributors and
79users, and allow the maintainers to devote more time to the projects,
80`please donate today`_.
81
82.. _please donate today: https://palletsprojects.com/donate
83
84
85Links
86-----
87
88- Documentation: https://markupsafe.palletsprojects.com/
89- Changes: https://markupsafe.palletsprojects.com/changes/
90- PyPI Releases: https://pypi.org/project/MarkupSafe/
91- Source Code: https://github.com/pallets/markupsafe/
92- Issue Tracker: https://github.com/pallets/markupsafe/issues/
93- Chat: https://discord.gg/pallets