From 96fb9a57da7b318f81245ed6f597dcd45f32a727 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Remko=20Tron=C3=A7on?= <git@el-tramo.be>
Date: Fri, 27 Apr 2012 23:24:52 +0200
Subject: Fixed LibXML parsing of &amp;

Resolves: #944

diff --git a/Swiften/Parser/LibXMLParser.cpp b/Swiften/Parser/LibXMLParser.cpp
index 1590262..7e8a093 100644
--- a/Swiften/Parser/LibXMLParser.cpp
+++ b/Swiften/Parser/LibXMLParser.cpp
@@ -69,6 +69,7 @@ LibXMLParser::LibXMLParser(XMLParserClient* client) : XMLParser(client) {
 	handler_.error = &handleError;
 
 	context_ = xmlCreatePushParserCtxt(&handler_, this, 0, 0, 0);
+	xmlCtxtUseOptions(context_, XML_PARSE_NOENT);
 	assert(context_);
 }
 
diff --git a/Swiften/Parser/PayloadParsers/UnitTest/StorageParserTest.cpp b/Swiften/Parser/PayloadParsers/UnitTest/StorageParserTest.cpp
index a378d0b..5ceec27 100644
--- a/Swiften/Parser/PayloadParsers/UnitTest/StorageParserTest.cpp
+++ b/Swiften/Parser/PayloadParsers/UnitTest/StorageParserTest.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010 Remko Tronçon
+ * Copyright (c) 2010-2012 Remko Tronçon
  * Licensed under the GNU General Public License v3.
  * See Documentation/Licenses/GPLv3.txt for more information.
  */
@@ -54,7 +54,7 @@ class StorageParserTest : public CppUnit::TestFixture {
 							"name='Council of Oberon' "
 							"jid='council@conference.underhill.org' />"
 					"<conference "
-							"name='Tea party' "
+							"name='Tea &amp; jam party' "
 							"jid='teaparty@wonderland.lit' />"
 				"</storage>"));
 
@@ -63,7 +63,7 @@ class StorageParserTest : public CppUnit::TestFixture {
 			CPPUNIT_ASSERT_EQUAL(2, static_cast<int>(rooms.size()));
 			CPPUNIT_ASSERT_EQUAL(std::string("Council of Oberon"), rooms[0].name);
 			CPPUNIT_ASSERT_EQUAL(JID("council@conference.underhill.org"), rooms[0].jid);
-			CPPUNIT_ASSERT_EQUAL(std::string("Tea party"), rooms[1].name);
+			CPPUNIT_ASSERT_EQUAL(std::string("Tea & jam party"), rooms[1].name);
 			CPPUNIT_ASSERT_EQUAL(JID("teaparty@wonderland.lit"), rooms[1].jid);
 		}
 
-- 
cgit v0.10.2-6-g49f6