From 701204254478a03fd95a2508be7f1f47bcebae43 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Thu, 27 Jan 2011 02:28:17 +0000 Subject: [PATCH] Fixed #15041 -- Added tests for the spaceless tag interacting with escaping. Thanks to steveire. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15334 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- tests/regressiontests/templates/tests.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/regressiontests/templates/tests.py b/tests/regressiontests/templates/tests.py index 99b4367f60..08957b0417 100644 --- a/tests/regressiontests/templates/tests.py +++ b/tests/regressiontests/templates/tests.py @@ -1136,6 +1136,9 @@ class Templates(unittest.TestCase): 'spaceless01': ("{% spaceless %} text {% endspaceless %}", {}, " text "), 'spaceless02': ("{% spaceless %} \n text \n {% endspaceless %}", {}, " text "), 'spaceless03': ("{% spaceless %}text{% endspaceless %}", {}, "text"), + 'spaceless04': ("{% spaceless %} {{ text }} {% endspaceless %}", {'text' : 'This & that'}, "This & that"), + 'spaceless05': ("{% autoescape off %}{% spaceless %} {{ text }} {% endspaceless %}{% endautoescape %}", {'text' : 'This & that'}, "This & that"), + 'spaceless06': ("{% spaceless %} {{ text|safe }} {% endspaceless %}", {'text' : 'This & that'}, "This & that"), # simple translation of a string delimited by ' 'i18n01': ("{% load i18n %}{% trans 'xxxyyyxxx' %}", {}, "xxxyyyxxx"),