1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-23 22:50:09 +03:00

Fix inconsistency between single and vector attribute xml for empty strings

This commit is contained in:
Carlos Martín 2016-04-26 17:20:32 +02:00
parent 471ac433f6
commit 851bd42d84

View File

@ -94,16 +94,9 @@ void VectorAttribute::to_xml(ostringstream &oss) const
continue;
}
if ( it->second.empty() )
{
oss << "<" << it->first << "/>";
}
else
{
oss << "<" << it->first << ">"
<< one_util::escape_xml(it->second)
<< "</" << it->first << ">";
}
oss << "<" << it->first << ">"
<< one_util::escape_xml(it->second)
<< "</" << it->first << ">";
}
oss << "</"<< name() << ">";