Fix problem with save graph

This commit is contained in:
Unick Soft
2020-08-20 19:07:20 +02:00
parent 475f4ea88b
commit 5e7d07a9aa
2 changed files with 7 additions and 1 deletions

View File

@@ -1,6 +1,9 @@
function gEncodeToHTML(str)
{
if (typeof str !== 'string')
return str;
return str.replace(/&/g, '&')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;')
@@ -10,6 +13,9 @@ function gEncodeToHTML(str)
function gDecodeFromHTML(str)
{
if (typeof str !== 'string')
return str;
return str.replace(/&apos;/g, "'")
.replace(/&quot;/g, '"')
.replace(/&gt;/g, '>')