diff options
| author | Russell Keith-Magee <russell@keith-magee.com> | 2011-01-27 02:28:17 +0000 |
|---|---|---|
| committer | Russell Keith-Magee <russell@keith-magee.com> | 2011-01-27 02:28:17 +0000 |
| commit | 701204254478a03fd95a2508be7f1f47bcebae43 (patch) | |
| tree | c4e14c9afb727884a7f841983ca1ac8f65595763 | |
| parent | 7c0e40534b7c2d8de9824a36824482d1067e195b (diff) | |
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
| -rw-r--r-- | tests/regressiontests/templates/tests.py | 3 |
1 files changed, 3 insertions, 0 deletions
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 %} <b> <i> text </i> </b> {% endspaceless %}", {}, "<b><i> text </i></b>"), 'spaceless02': ("{% spaceless %} <b> \n <i> text </i> \n </b> {% endspaceless %}", {}, "<b><i> text </i></b>"), 'spaceless03': ("{% spaceless %}<b><i>text</i></b>{% endspaceless %}", {}, "<b><i>text</i></b>"), + 'spaceless04': ("{% spaceless %}<b> <i>{{ text }}</i> </b>{% endspaceless %}", {'text' : 'This & that'}, "<b><i>This & that</i></b>"), + 'spaceless05': ("{% autoescape off %}{% spaceless %}<b> <i>{{ text }}</i> </b>{% endspaceless %}{% endautoescape %}", {'text' : 'This & that'}, "<b><i>This & that</i></b>"), + 'spaceless06': ("{% spaceless %}<b> <i>{{ text|safe }}</i> </b>{% endspaceless %}", {'text' : 'This & that'}, "<b><i>This & that</i></b>"), # simple translation of a string delimited by ' 'i18n01': ("{% load i18n %}{% trans 'xxxyyyxxx' %}", {}, "xxxyyyxxx"), |
