Binary package “python-markupsafe” in bilimbitest angry
XML/HTML/XHTML Markup safe string for Python
MarkupSafe implements a unicode subclass that supports HTML strings:
.
>>> from markupsafe import Markup, escape
>>> escape(
Markup(
>>> tmpl = Markup(
>>> tmpl % "Peter > Lustig"
Markup(
.
If you want to make an object unicode that is not yet unicode
but don't want to lose the taint information, you can use the
`soft_unicode` function:
.
>>> from markupsafe import soft_unicode
>>> soft_unicode(42)
u'42'
>>> soft_unicode(
Markup(u'foo')