Django

Code

Ticket #6471: force_escape.diff

File force_escape.diff, 472 bytes (added by nedbatchelder, 1 year ago)

The patch!

  • django/template/defaultfilters.py

    old new  
    343343    """ 
    344344    from django.utils.html import escape 
    345345    return mark_safe(escape(value)) 
    346 escape = stringfilter(escape) 
     346force_escape = stringfilter(force_escape) 
    347347force_escape.is_safe = True 
    348348 
    349349def linebreaks(value, autoescape=None):