Decode HTML Template Tag

 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

  1. Google Maps Templatetag by javinievas 6 years, 10 months ago
  2. django filter decode by addo 1 year, 3 months ago
  3. Simple "html email with images" sender by andres_torres_marroquin 3 years, 1 month ago
  4. Python Calendar wrapper template tag by dokterbob 4 years, 11 months ago
  5. Querystring Builder - create urls with GET params by jibberia 3 years, 3 months ago

Comments

(Forgotten your password?)