Added a 'htmlfilters' tag library containing 'removetags'

- Legacy-Id: 12823
This commit is contained in:
Henrik Levkowetz 2017-02-12 17:05:55 +00:00
parent aeede944d1
commit a1606e8f7d

View file

@ -0,0 +1,17 @@
# Copyright the IETF Trust 2017, All Rights Reserved
from __future__ import unicode_literals
from django.template.library import Library
from django.template.defaultfilters import stringfilter
from ietf.utils.html import remove_tags
register = Library()
@register.filter(is_safe=True)
@stringfilter
def removetags(value, tags):
"""Removes a space separated list of [X]HTML tags from the output."""
return remove_tags(value, tags)