joestump / django-ajax

A simple framework for creating AJAX endpoints in Django.
http://github.com/joestump/django-ajax
BSD 3-Clause "New" or "Revised" License
260 stars 54 forks source link

Add per-call HTML escaping option. #18

Closed gblache closed 12 years ago

gblache commented 12 years ago

This does two things:

If you encode an iterable object it grabs the appropriate encoder for each element as opposed to donking off to the DefaultEncoder.

Also, it allows you to pass in an htmlescape argument to the encode method. This makes it so you can register an ExcludeEncoder for a User object but only escape arguments when you need them to be, like in a template tag.