fixes 0003632: Drawing lines on top of an image will not save the work (Reason: ' &' in the file name)

This commit is contained in:
wmayer
2018-10-11 21:50:32 +02:00
parent 5fd900d661
commit ff82dc81d1

View File

@@ -423,8 +423,10 @@ void PropertyFileIncluded::Save (Base::Writer &writer) const
// instead initiate an extra file
if (!_cValue.empty()) {
Base::FileInfo file(_cValue.c_str());
std::string filename = writer.addFile(file.fileName().c_str(), this);
filename = encodeAttribute(filename);
writer.Stream() << writer.ind() << "<FileIncluded file=\""
<< writer.addFile(file.fileName().c_str(), this) << "\"/>" << std::endl;
<< filename << "\"/>" << std::endl;
}
else {
writer.Stream() << writer.ind() << "<FileIncluded file=\"\"/>" << std::endl;