From 5e7d07a9aa9044576f4893e03e144e43587ea1ac Mon Sep 17 00:00:00 2001 From: Unick Soft Date: Thu, 20 Aug 2020 19:07:20 +0200 Subject: [PATCH] Fix problem with save graph --- script/utils.js | 6 ++++++ tpl/home.php | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/script/utils.js b/script/utils.js index f5bff40..fff03c0 100644 --- a/script/utils.js +++ b/script/utils.js @@ -1,6 +1,9 @@ function gEncodeToHTML(str) { + if (typeof str !== 'string') + return str; + return str.replace(/&/g, '&') .replace(//g, '>') @@ -10,6 +13,9 @@ function gEncodeToHTML(str) function gDecodeFromHTML(str) { + if (typeof str !== 'string') + return str; + return str.replace(/'/g, "'") .replace(/"/g, '"') .replace(/>/g, '>') diff --git a/tpl/home.php b/tpl/home.php index cf34569..db3d541 100755 --- a/tpl/home.php +++ b/tpl/home.php @@ -10,7 +10,7 @@ - +