Fix bug with text for nodes. Add escaping symbols.

This commit is contained in:
Unick Soft
2020-08-19 20:45:26 +02:00
parent f068ee2a32
commit 475f4ea88b
6 changed files with 36 additions and 16 deletions

View File

@@ -34,8 +34,8 @@ BaseVertex.prototype.SaveToXML = function ()
"positionX=\"" + this.position.x + "\" " +
"positionY=\"" + this.position.y + "\" " +
"id=\"" + this.id + "\" " +
"mainText=\"" + this.mainText + "\" " +
"upText=\"" + this.upText + "\" " +
"mainText=\"" + gEncodeToHTML(this.mainText) + "\" " +
"upText=\"" + gEncodeToHTML(this.upText) + "\" " +
"></node>";
}
@@ -52,8 +52,13 @@ BaseVertex.prototype.LoadFromXML = function (xml)
if (typeof this.mainText === 'undefined')
this.mainText = this.id;
else
this.mainText = gDecodeFromHTML(this.mainText);
if (typeof this.upText === 'undefined')
this.upText = "";
else
this.upText = gDecodeFromHTML(this.upText);
}
BaseVertex.prototype.SetId = function (id)