Skip to content

Commit f84756b

Browse files
gromandreasjengelh
authored andcommitted
ews: deserialize no text tags as empty strings
Some clients (e.g. Mac Calendar) send tags containing no text, e.g. `<t:Body BodyType="Text"/>`. In such cases, it should be deserialized as an empty string.
1 parent d3e73ac commit f84756b

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

exch/ews/serialization.hpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,7 @@ struct ExplicitConvert<std::string>
131131
static tinyxml2::XMLError deserialize(const tinyxml2::XMLElement *xml, std::string &value)
132132
{
133133
const char* data = xml->GetText();
134-
if(!data)
135-
return tinyxml2::XML_NO_TEXT_NODE;
136-
value = data;
134+
value = data ? data : std::string("");
137135
return tinyxml2::XML_SUCCESS;
138136
}
139137

0 commit comments

Comments
 (0)