diff options
| author | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2015-04-02 00:15:44 +0200 | 
|---|---|---|
| committer | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2016-04-25 22:19:29 +0200 | 
| commit | 971899fd404f4828886f07fb269a2111fe2d8b42 (patch) | |
| tree | 5c466c0500ef9593ecd44d0f47dacc27e66b4acb /test | |
| parent | 0a8e622c85842d79683fd0556f2443096d7a9ca2 (diff) | |
Do not trim text, simply skip text fields that only consist of whitespace characters
Diffstat (limited to 'test')
| -rw-r--r-- | test/integration/TestXmlParser.cpp | 4 | 
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; | 
