summaryrefslogtreecommitdiff
path: root/test/integration/TestXmlParser.cpp
diff options
context:
space:
mode:
authorAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2015-04-02 00:15:44 +0200
committerAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2016-04-25 22:19:29 +0200
commit971899fd404f4828886f07fb269a2111fe2d8b42 (patch)
tree5c466c0500ef9593ecd44d0f47dacc27e66b4acb /test/integration/TestXmlParser.cpp
parent0a8e622c85842d79683fd0556f2443096d7a9ca2 (diff)
Do not trim text, simply skip text fields that only consist of whitespace characters
Diffstat (limited to 'test/integration/TestXmlParser.cpp')
-rw-r--r--test/integration/TestXmlParser.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/integration/TestXmlParser.cpp b/test/integration/TestXmlParser.cpp
index b9eae0e..a3d4563 100644
--- a/test/integration/TestXmlParser.cpp
+++ b/test/integration/TestXmlParser.cpp
@@ -179,8 +179,8 @@ static void xmlCharacterDataHandler(void *ref, const XML_Char *s, int len)
*(static_cast<std::shared_ptr<XmlNode> *>(XML_GetUserData(parser)));
// Store a new text node in the current node
- std::string text = Utils::trim(std::string(s, len));
- if (!text.empty()) {
+ std::string text = std::string(s, len);
+ if (Utils::hasNonWhitepaceChar(text)) {
std::shared_ptr<XmlNode> textNode =
std::make_shared<XmlNode>(node, "$text");
textNode->text = text;