escape
function uses the __html__
method on an object if it's available. It will now ensure that result is wrapped in the Markup
class, for consistency with other behavior.Installing from PyPI with pip will now install a precompiled wheel if available. Wheels have been compiled for supported CPython versions on Linux, Mac, and Windows.
MarkupSafe comes with a C extension that adds a significant speedup to escaping. However, if a compiler or headers aren't available, the install will fall back to a native Python implementation. Previously, the user would see no indication that they didn't get the speedups, or would see confusing error messages even though the install succeeded. Now, many more users will be able to take advantage of the speedups provided by MarkupSafe without extra configuration.
Full documentation has been added in place of the previous README. It is available through Read the Docs at https://markupsafe.palletsprojects.com/.
Install from PyPI with pip:
pip install -U MarkupSafe
We accept donations through the Python Software Foundation in order to support our efforts to maintain the projects and grow the community. Click here to donate.