Changes between Version 266 and Version 267 of BackwardsIncompatibleChanges


Ignore:
Timestamp:
09/24/08 18:50:31 (7 years ago)
Author:
kmtracey
Comment:

Removed an extraneous slash introduced in previous edit.

Legend:

Unmodified
Added
Removed
Modified
  • BackwardsIncompatibleChanges

    v266 v267  
    9696}}}
    9797should be modified to read:
     98
    9899
    99100
     
    413414      The second and probably more robust way is to use {{{mark_safe()}}} where appropriate (see [http://docs.djangoproject.com/en/dev/howto/custom-template-tags/#filters-and-auto-escaping the documentation] for details) and go through each of your custom filters attaching {{{is_safe}}} and {{{needs_autoescape}}} attributes where necessary (again, the details are in the above documentation).
    414415     
    415       Have a look at Django's default filters (in {{{django/template/defaultfilters.py}}}) for examples of how mixed filters (those which behave differently depending upon whether auto-escaping is in effect o/r not) can be written.
     416      Have a look at Django's default filters (in {{{django/template/defaultfilters.py}}}) for examples of how mixed filters (those which behave differently depending upon whether auto-escaping is in effect or not) can be written.
    416417
    417418The attributes on filter functions and the new {{{escape}}} behaviour mean that you can write templates and filters that will operate correctly in both auto-escaping and non-auto-escaping environments, so you're not forcing your decision onto users of your filters, if you distribute the code.
Back to Top