Paketname | python3-markupsafe |
Beschreibung | XML/HTML/XHTML Markup safe string for Python3 |
Archiv/Repository | Offizielles Debian Archiv squeeze (main) |
Version | 0.9.2-3 |
Sektion | python |
Priorität | optional |
Installierte Größe | 112 Byte |
Hängt ab von | python3 (>= 3.1.2-8~), libc6 (>= 2.3.6-6~) |
Empfohlene Pakete | |
Paketbetreuer | Piotr Ożarowski |
Quelle | markupsafe |
Paketgröße | 12250 Byte |
Prüfsumme MD5 | cf0fb2f5c23064e8e87e947c6421a0ab |
Prüfsumme SHA1 | c7881230b237b2c1adcc1647ae7c36867776ecd4 |
Prüfsumme SHA256 | ff89ffd709a8536c79e0fe16753abe0fc780aa17258f38573805e7e5f596af37 |
Link zum Herunterladen | python3-markupsafe_0.9.2-3_i386.deb |
Ausführliche Beschreibung | MarkupSafe implements a unicode subclass that supports HTML strings:
.
>>> from markupsafe import Markup, escape
>>> escape("")
Markup('<script>alert(document.cookie);</script>')
>>> tmpl = Markup("%s")
>>> tmpl % "Peter > Lustig"
Markup('Peter > Lustig')
.
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)
'42'
>>> soft_unicode(Markup('foo'))
Markup('foo')
|