diff --git a/scrapy/tests/test_utils_sitemap.py b/scrapy/tests/test_utils_sitemap.py
index 0049e5c40..56585143f 100644
--- a/scrapy/tests/test_utils_sitemap.py
+++ b/scrapy/tests/test_utils_sitemap.py
@@ -188,13 +188,28 @@ Disallow: /forum/active/
""")
-
+
self.assertEqual(list(s), [
{'loc': 'http://www.example.com/english/',
'alternate': ['http://www.example.com/deutsch/', 'http://www.example.com/schweiz-deutsch/', 'http://www.example.com/english/']
}
])
+ def test_xml_entity_expansion(self):
+ s = Sitemap("""
+
+
+ ]>
+
+
+ http://127.0.0.1:8000/&xxe;
+
+
+ """)
+
+ self.assertEqual(list(s), [{'loc': 'http://127.0.0.1:8000/'}])
+
if __name__ == '__main__':
unittest.main()