1 2 3 4 5 6 7 8 9 10 | from django import template
import HTMLParser
register = template.Library()
@register.filter
def decode(value):
"""HTML decodes a string """
h = HTMLParser.HTMLParser()
return h.unescape(value)
|
More like this
- testdata tag for templates by showell 4 years ago
- Encode emails as URIs by fahhem 2 years, 9 months ago
- SOAP views with on-demand WSDL generation by chewie 4 years, 9 months ago
- Tags & filters for rendering search results by exogen 5 years, 2 months ago
- Yet another SQL debugging facility by miracle2k 5 years, 9 months ago
Comments