From ee29ec62be475e9719785917758e059b9bca124b Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Thu, 27 Jan 2011 02:42:45 +0000 Subject: [PATCH] [1.2.X] Fixed #15041 -- Added tests for the spaceless tag interacting with escaping. Thanks to steveire. Backport of r15334 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@15337 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 62b2237a83..7acc98b819 100644 --- a/tests/regressiontests/templates/tests.py +++ b/tests/regressiontests/templates/tests.py @@ -1049,6 +1049,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"),