markupsafe
MarkupSafe is a Python library that provides a small, well-defined API for safely handling text that will be embedded in HTML or XML contexts. It aims to prevent injection vulnerabilities by offering reliable escaping and a way to mark content as safe for rendering.
The core components of MarkupSafe are the Markup class and the escape function. Markup is a subclass
MarkupSafe is widely used in templating systems, most notably by Jinja2, the templating engine used by Flask
The project is part of the Pallets Projects and is maintained with open-source releases on PyPI and