TypeError: argument cannot be of '__proxy__' type, must be of text type
from django.utils.safestring import mark_safe
import bleach
@register.filter()
def safer(text):
return mark_safe(bleach.clean(text, tags=_ALLOWED_TAGS, attributes=_ALLOWED_ATTRIBUTES))