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"),