Skip to content

Commit

Permalink
encode names of constraints when writing to XML
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Apr 30, 2017
1 parent 5465bc4 commit 84eb915
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Mod/Sketcher/App/Constraint.cpp
Expand Up @@ -29,6 +29,7 @@
#include <Base/Writer.h>
#include <Base/Reader.h>
#include <Base/Tools.h>
#include <App/Property.h>
#include <QDateTime>

#include "Constraint.h"
Expand Down Expand Up @@ -161,8 +162,9 @@ unsigned int Constraint::getMemSize (void) const

void Constraint::Save (Writer &writer) const
{
std::string encodeName = App::Property::encodeAttribute(Name);
writer.Stream() << writer.ind() << "<Constrain "
<< "Name=\"" << Name << "\" "
<< "Name=\"" << encodeName << "\" "
<< "Type=\"" << (int)Type << "\" ";
if(this->Type==InternalAlignment)
writer.Stream()
Expand Down

0 comments on commit 84eb915

Please sign in to comment.