Skip to content

Commit a1606e8

Browse files
committed
Added a 'htmlfilters' tag library containing 'removetags'
- Legacy-Id: 12823
1 parent aeede94 commit a1606e8

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Copyright the IETF Trust 2017, All Rights Reserved
2+
3+
from __future__ import unicode_literals
4+
5+
from django.template.library import Library
6+
from django.template.defaultfilters import stringfilter
7+
8+
from ietf.utils.html import remove_tags
9+
10+
register = Library()
11+
12+
@register.filter(is_safe=True)
13+
@stringfilter
14+
def removetags(value, tags):
15+
"""Removes a space separated list of [X]HTML tags from the output."""
16+
return remove_tags(value, tags)
17+

0 commit comments

Comments
 (0)