Implemented auto-escaping of variable output in templates. Fully controllable by...
commitda16db1662f54a9963a97b3d4b00b0e2e8137829
authormtredinnick <mtredinnick@bcc190cf-cafb-0310-a4f2-bffc1f526a37>
Wed, 14 Nov 2007 12:58:53 +0000 (14 12:58 +0000)
committermtredinnick <mtredinnick@bcc190cf-cafb-0310-a4f2-bffc1f526a37>
Wed, 14 Nov 2007 12:58:53 +0000 (14 12:58 +0000)
tree6ee45dfcb9c91e1184dcc73751e0b856892451ed
parentce6ba3c96f43b83a7569d0ddee718bdc51b72b58
Implemented auto-escaping of variable output in templates. Fully controllable by template authors and it's possible to write filters and templates that simulataneously work in both auto-escaped and non-auto-escaped environments if you need to. Fixed #2359

See documentation in templates.txt and templates_python.txt for how everything
works.

Backwards incompatible if you're inserting raw HTML output via template variables.

Based on an original design from Simon Willison and with debugging help from Michael Radziej.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@6671 bcc190cf-cafb-0310-a4f2-bffc1f526a37
53 files changed:
django/contrib/admin/filterspecs.py
django/contrib/admin/models.py
django/contrib/admin/templates/admin/base_site.html
django/contrib/admin/templates/admin/change_form.html
django/contrib/admin/templates/admin/date_hierarchy.html
django/contrib/admin/templates/admin/delete_confirmation.html
django/contrib/admin/templates/admin/edit_inline_stacked.html
django/contrib/admin/templates/admin/edit_inline_tabular.html
django/contrib/admin/templates/admin/index.html
django/contrib/admin/templates/admin/invalid_setup.html
django/contrib/admin/templates/admin/object_history.html
django/contrib/admin/templates/admin/pagination.html
django/contrib/admin/templates/admin_doc/model_detail.html
django/contrib/admin/templates/widget/foreign.html
django/contrib/admin/templates/widget/one_to_one.html
django/contrib/admin/templatetags/admin_list.py
django/contrib/admin/templatetags/admin_modify.py
django/contrib/admin/templatetags/adminapplist.py
django/contrib/admin/utils.py
django/contrib/admin/views/decorators.py
django/contrib/admin/views/doc.py
django/contrib/admin/views/main.py
django/contrib/csrf/middleware.py
django/contrib/databrowse/datastructures.py
django/contrib/databrowse/plugins/calendars.py
django/contrib/databrowse/plugins/fieldchoices.py
django/contrib/databrowse/sites.py
django/contrib/flatpages/views.py
django/contrib/humanize/templatetags/humanize.py
django/contrib/markup/templatetags/markup.py
django/contrib/markup/tests.py
django/contrib/sitemaps/templates/sitemap.xml
django/contrib/sitemaps/templates/sitemap_index.xml
django/newforms/forms.py
django/newforms/util.py
django/newforms/widgets.py
django/oldforms/__init__.py
django/template/__init__.py
django/template/context.py
django/template/defaultfilters.py
django/template/defaulttags.py
django/utils/encoding.py
django/utils/html.py
django/utils/safestring.py [new file with mode: 0644]
django/views/debug.py
docs/templates.txt
docs/templates_python.txt
tests/regressiontests/defaultfilters/tests.py
tests/regressiontests/forms/forms.py
tests/regressiontests/forms/tests.py
tests/regressiontests/humanize/tests.py
tests/regressiontests/templates/filters.py [new file with mode: 0644]
tests/regressiontests/templates/tests.py