From d6f10adb0a723022eb4e4b57cdfff8288145f407 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Remko=20Tron=C3=A7on?= <git@el-tramo.be>
Date: Sat, 28 Apr 2012 10:38:15 +0200
Subject: Make sure our parser doesn't handle entities.


diff --git a/Swiften/Parser/UnitTest/XMLParserTest.cpp b/Swiften/Parser/UnitTest/XMLParserTest.cpp
index 3c84220..4bdeb54 100644
--- a/Swiften/Parser/UnitTest/XMLParserTest.cpp
+++ b/Swiften/Parser/UnitTest/XMLParserTest.cpp
@@ -35,6 +35,7 @@ class XMLParserTest : public CppUnit::TestFixture {
 		CPPUNIT_TEST(testParse_AttributeWithoutNamespace);
 		CPPUNIT_TEST(testParse_AttributeWithNamespace);
 		CPPUNIT_TEST(testParse_BillionLaughs);
+		CPPUNIT_TEST(testParse_InternalEntity);
 		//CPPUNIT_TEST(testParse_UndefinedPrefix);
 		//CPPUNIT_TEST(testParse_UndefinedAttributePrefix);
 		CPPUNIT_TEST_SUITE_END();
@@ -274,6 +275,12 @@ class XMLParserTest : public CppUnit::TestFixture {
 			));
 		}
 
+		void testParse_InternalEntity() {
+			ParserType testling(&client_);
+
+			CPPUNIT_ASSERT(!testling.parse("<!DOCTYPE foo [<!ENTITY bar \"Bar\">]><foo>&bar;</foo>"));
+		}
+
 		void testParse_UndefinedPrefix() {
 			ParserType testling(&client_);
 
-- 
cgit v0.10.2-6-g49f6