You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
326 B
10 lines
326 B
from django.utils.html import strip_tags_re
|
|
from django.utils.encoding import force_text
|
|
from django.utils.functional import allow_lazy
|
|
|
|
|
|
def strip_tags(value):
|
|
"""Returns the given HTML with all tags replaced with single space."""
|
|
return strip_tags_re.sub(' ', force_text(value))
|
|
|
|
strip_tags = allow_lazy(strip_tags)
|
|
|