summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2012-04-27 21:24:52 (GMT)
committerRemko Tronçon <git@el-tramo.be>2012-04-27 21:24:52 (GMT)
commit96fb9a57da7b318f81245ed6f597dcd45f32a727 (patch)
tree54370af52e2f725f792c0ddc3bc57c6084f9274f /Swiften/Parser
parentd197c6b11748a7e98ca8ddacf5f43023f25e667a (diff)
downloadswift-contrib-96fb9a57da7b318f81245ed6f597dcd45f32a727.zip
swift-contrib-96fb9a57da7b318f81245ed6f597dcd45f32a727.tar.bz2
Fixed LibXML parsing of &amp;
Resolves: #944
Diffstat (limited to 'Swiften/Parser')
-rw-r--r--Swiften/Parser/LibXMLParser.cpp1
-rw-r--r--Swiften/Parser/PayloadParsers/UnitTest/StorageParserTest.cpp6
2 files changed, 4 insertions, 3 deletions
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);
}