Is there some reason you cannot mark the string safe in Python code using one of the following methods? I think that's where escaping logic belongs.
https://docs.djangoproject.com/en/stable/ref/utils/#django.utils.html.format_html https://docs.djangoproject.com/en/stable/ref/utils/#django.utils.safestring.mark_safe On Monday, January 25, 2016 at 10:12:17 AM UTC-5, Hangyu Zhang wrote: > > Hi All, > > I want to add a new filter names 'noescape' to django template. After > that, > > {{ <context variable>|noescape }} > > will output the context variable without auto escape. > > It will be more convenient than > > {% autoescape off %}{{ <context variable> }} {% endautoescape %} > > Thanks and regards, > > Hans > -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To post to this group, send email to django-developers@googlegroups.com. Visit this group at https://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/cc4ee24d-9186-4398-80f9-2aa2cd52a564%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.