• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Metadata-Version: 1.2
2Name: MarkupSafe
3Version: 1.1.1
4Summary: Safely add untrusted strings to HTML/XML markup.
5Home-page: https://palletsprojects.com/p/markupsafe/
6Author: Armin Ronacher
7Author-email: armin.ronacher@active-4.com
8Maintainer: The Pallets Team
9Maintainer-email: contact@palletsprojects.com
10License: BSD-3-Clause
11Project-URL: Documentation, https://markupsafe.palletsprojects.com/
12Project-URL: Code, https://github.com/pallets/markupsafe
13Project-URL: Issue tracker, https://github.com/pallets/markupsafe/issues
14Description: MarkupSafe
15        ==========
16
17        MarkupSafe implements a text object that escapes characters so it is
18        safe to use in HTML and XML. Characters that have special meanings are
19        replaced so that they display as the actual characters. This mitigates
20        injection attacks, meaning untrusted user input can safely be displayed
21        on a page.
22
23
24        Installing
25        ----------
26
27        Install and update using `pip`_:
28
29        .. code-block:: text
30
31            pip install -U MarkupSafe
32
33        .. _pip: https://pip.pypa.io/en/stable/quickstart/
34
35
36        Examples
37        --------
38
39        .. code-block:: pycon
40
41            >>> from markupsafe import Markup, escape
42            >>> # escape replaces special characters and wraps in Markup
43            >>> escape('<script>alert(document.cookie);</script>')
44            Markup(u'&lt;script&gt;alert(document.cookie);&lt;/script&gt;')
45            >>> # wrap in Markup to mark text "safe" and prevent escaping
46            >>> Markup('<strong>Hello</strong>')
47            Markup('<strong>hello</strong>')
48            >>> escape(Markup('<strong>Hello</strong>'))
49            Markup('<strong>hello</strong>')
50            >>> # Markup is a text subclass (str on Python 3, unicode on Python 2)
51            >>> # methods and operators escape their arguments
52            >>> template = Markup("Hello <em>%s</em>")
53            >>> template % '"World"'
54            Markup('Hello <em>&#34;World&#34;</em>')
55
56
57        Donate
58        ------
59
60        The Pallets organization develops and supports MarkupSafe and other
61        libraries that use it. In order to grow the community of contributors
62        and users, and allow the maintainers to devote more time to the
63        projects, `please donate today`_.
64
65        .. _please donate today: https://palletsprojects.com/donate
66
67
68        Links
69        -----
70
71        *   Website: https://palletsprojects.com/p/markupsafe/
72        *   Documentation: https://markupsafe.palletsprojects.com/
73        *   License: `BSD-3-Clause <https://github.com/pallets/markupsafe/blob/master/LICENSE.rst>`_
74        *   Releases: https://pypi.org/project/MarkupSafe/
75        *   Code: https://github.com/pallets/markupsafe
76        *   Issue tracker: https://github.com/pallets/markupsafe/issues
77        *   Test status:
78
79            *   Linux, Mac: https://travis-ci.org/pallets/markupsafe
80            *   Windows: https://ci.appveyor.com/project/pallets/markupsafe
81
82        *   Test coverage: https://codecov.io/gh/pallets/markupsafe
83
84Platform: UNKNOWN
85Classifier: Development Status :: 5 - Production/Stable
86Classifier: Environment :: Web Environment
87Classifier: Intended Audience :: Developers
88Classifier: License :: OSI Approved :: BSD License
89Classifier: Operating System :: OS Independent
90Classifier: Programming Language :: Python
91Classifier: Programming Language :: Python :: 2
92Classifier: Programming Language :: Python :: 2.7
93Classifier: Programming Language :: Python :: 3
94Classifier: Programming Language :: Python :: 3.4
95Classifier: Programming Language :: Python :: 3.5
96Classifier: Programming Language :: Python :: 3.6
97Classifier: Programming Language :: Python :: 3.7
98Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
99Classifier: Topic :: Software Development :: Libraries :: Python Modules
100Classifier: Topic :: Text Processing :: Markup :: HTML
101Requires-Python: >=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*
102