PKG-INFO 4.0 KB

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