Paketname | python-markupsafe |
Beschreibung | XML/HTML/XHTML Markup safe string for Python |
Archiv/Repository | Offizielles Debian Archiv squeeze (main) |
Version | 0.9.2-3 |
Sektion | python |
Priorität | optional |
Installierte Größe | 212 Byte |
Hängt ab von | python2.6 | python2.5, python (>= 2.6.5-11~), python (<< 2.7), libc6 (>= 2.3.6-6~) |
Empfohlene Pakete | |
Paketbetreuer | Piotr Ożarowski |
Quelle | markupsafe |
Paketgröße | 14502 Byte |
Prüfsumme MD5 | e2e429c0aeb926ef99fd266441d6a033 |
Prüfsumme SHA1 | caf02e15830fca93b4c6c59f7ce502ac6e19bcda |
Prüfsumme SHA256 | 002ee9cf47f2c8b5afa5a490889dc66122f65d312e3758f6b2c158c54b7be508 |
Link zum Herunterladen | python-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(u'<script>alert(document.cookie);</script>')
>>> tmpl = Markup("%s")
>>> tmpl % "Peter > Lustig"
Markup(u'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)
u'42'
>>> soft_unicode(Markup('foo'))
Markup(u'foo')
|