Skip to content

Commit aaeea76

Browse files
committed
Problem: autoescape not getting passed to urlize_quoted_links filter
Solution: set needs_autoescape=True when registering the filter Without this patch, the disabling autoescape in the template does not work.
1 parent 5174a26 commit aaeea76

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rest_framework/templatetags/rest_framework.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ def smart_urlquote_wrapper(matched_url):
314314
return None
315315

316316

317-
@register.filter
317+
@register.filter(needs_autoescape=True)
318318
def urlize_quoted_links(text, trim_url_limit=None, nofollow=True, autoescape=True):
319319
"""
320320
Converts any URLs in text into clickable links.

0 commit comments

Comments
 (0)