Profile image for Ian Lewis IanLewis
A stripentities filter that works much like the striptags filter except that it strips html entities.
Language
Python
Tags
django entities filter html strip template
Favorited By
Profile image for Carly Ho

stripentities filter

1 def stripentities(value): 2 """Strips all HTML entities""" 3 from django.utils.html import strip_entities 4 return strip_entities(value) 5 stripentities.is_safe = True 6 stripentities = stringfilter(stripentities) 7 register.filter(stripentities)

Comments