From ff82dc81d1f025d4587d6ea77d187f04a19d82bb Mon Sep 17 00:00:00 2001 From: wmayer Date: Thu, 11 Oct 2018 21:50:32 +0200 Subject: [PATCH] fixes 0003632: Drawing lines on top of an image will not save the work (Reason: ' &' in the file name) --- src/App/PropertyFile.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/App/PropertyFile.cpp b/src/App/PropertyFile.cpp index 282e1748c1..1a38e36dab 100644 --- a/src/App/PropertyFile.cpp +++ b/src/App/PropertyFile.cpp @@ -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() << "" << std::endl; + << filename << "\"/>" << std::endl; } else { writer.Stream() << writer.ind() << "" << std::endl;