On 07/28/06 15:34, Ahmad Alhashemi wrote: <snip> > > Bill de hÓra wrote: >> Scope it per template: >> >> {% extends "base_generic.html" %} >> {% escape %} >> >> This lets people who want auto-escaping, have it, without typing in >> "|escape" everywhere or screwing things up site wide with globals. > > This is nearly perfect for my taste. The only thing is to make it just > a bit more generic like this: > > {% autofilter escape %} > > This will specify that the escape filter will be applied automatically > to all variables. It is just as easy to use, it is not specific to HTML > and it can be used in other useful contexts, like for escaping in a > JavaScript template. It doesn't break backward's compatibility. It > doesn't force you to do anything you don't want to. > > We can even provide the {! !} tags to mean "do not apply auto filter". > Then I can immagine some files starting with: > > {% autofilter javascript_escape %} > > Then escaping and the {! !} will work perfecly well in a JavaScript > template. >
nice! +1 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers -~----------~----~----~----~------~----~------~--~---