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

@@ -1474,20 +1474,12 @@ Application.prototype.LoadUserSettings = function(json)
Application.prototype.EncodeToHTML = function (str)
{
return str.replace(/&/g, '&')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;')
.replace(/"/g, '&quot;')
.replace(/'/g, '&apos;');
return gEncodeToHTML(str);
}
Application.prototype.DecodeFromHTML = function (str)
{
return str.replace(/&apos;/g, "'")
.replace(/&quot;/g, '"')
.replace(/&gt;/g, '>')
.replace(/&lt;/g, '<')
.replace(/&amp;/g, '&');
return gDecodeFromHTML(str);
}
Application.prototype.SetVertexStyle = function (index, style)