Open spenserblack opened 1 year ago
Is your feature request related to a problem? Please describe.
Right now, html|bleach is marked as safe, but html|bleach_linkify is an unsafe, raw string.
html|bleach
html|bleach_linkify
I guess this is intended behavior given the test linked below, but this seems like strange behavior to me https://github.com/marksweb/django-bleach/blob/aefb860ed68870e5af874bb6184c8402de6227be/django_bleach/tests/test_templatetags.py#L58
Describe the solution you'd like
Just like the bleach template tag, I'd like bleach_linkify to return a safestring, not a raw string.
bleach
bleach_linkify
Describe alternatives you've considered
As the linked test shows, html|bleach_linkify|safe seems to be OK (in my usage I actually had to use html|bleach|bleach_linkify|safe).
html|bleach_linkify|safe
html|bleach|bleach_linkify|safe
Additional context AFAIK bleach does support a way to both sanitize HTML and linkify in one pass. Maybe that's a possibility?
Is your feature request related to a problem? Please describe.
Right now,
html|bleach
is marked as safe, buthtml|bleach_linkify
is an unsafe, raw string.I guess this is intended behavior given the test linked below, but this seems like strange behavior to me https://github.com/marksweb/django-bleach/blob/aefb860ed68870e5af874bb6184c8402de6227be/django_bleach/tests/test_templatetags.py#L58
Describe the solution you'd like
Just like the
bleach
template tag, I'd likebleach_linkify
to return a safestring, not a raw string.Describe alternatives you've considered
As the linked test shows,
html|bleach_linkify|safe
seems to be OK (in my usage I actually had to usehtml|bleach|bleach_linkify|safe
).Additional context AFAIK bleach does support a way to both sanitize HTML and linkify in one pass. Maybe that's a possibility?