summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2012-04-28 08:38:15 (GMT)
committerRemko Tronçon <git@el-tramo.be>2012-04-28 08:38:15 (GMT)
commitd6f10adb0a723022eb4e4b57cdfff8288145f407 (patch)
treeb50c64673b7108f2df0e5ca909b6e7346bc0fe1f /Swiften
parent96fb9a57da7b318f81245ed6f597dcd45f32a727 (diff)
downloadswift-d6f10adb0a723022eb4e4b57cdfff8288145f407.zip
swift-d6f10adb0a723022eb4e4b57cdfff8288145f407.tar.bz2
Make sure our parser doesn't handle entities.
Diffstat (limited to 'Swiften')
-rw-r--r--Swiften/Parser/UnitTest/XMLParserTest.cpp7
1 files changed, 7 insertions, 0 deletions
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_);