encode keys of PropertyMap when saving as XML

This commit is contained in:
wmayer
2019-09-05 18:51:35 +02:00
parent f1e963c8fb
commit 12e92fef31

View File

@@ -1973,8 +1973,10 @@ void PropertyMap::Save (Base::Writer &writer) const
{
writer.Stream() << writer.ind() << "<Map count=\"" << getSize() <<"\">" << endl;
writer.incInd();
for (std::map<std::string,std::string>::const_iterator it = _lValueList.begin();it!= _lValueList.end(); ++it)
writer.Stream() << writer.ind() << "<Item key=\"" << it->first <<"\" value=\"" << encodeAttribute(it->second) <<"\"/>" << endl;
for (std::map<std::string,std::string>::const_iterator it = _lValueList.begin();it!= _lValueList.end(); ++it) {
writer.Stream() << writer.ind() << "<Item key=\"" << encodeAttribute(it->first)
<< "\" value=\"" << encodeAttribute(it->second) <<"\"/>" << endl;
}
writer.decInd();
writer.Stream() << writer.ind() << "</Map>" << endl ;