fix injection bugs in table editor

This commit is contained in:
2018-08-12 21:58:42 +02:00
parent b716260a53
commit 7ae41b368e
6 changed files with 13 additions and 26 deletions
+2 -2
View File
@@ -88,7 +88,7 @@ function vali($arr) {
*/
function old_json($name, $default) {
$old = old($name, null);
if (is_string($old)) return json_decode($old);
if (is_string($old)) return fromJSON($old);
return $default;
}
@@ -104,7 +104,7 @@ function toJSON($object, $emptyObj=false) {
$object = $object->toArray();
}
return \GuzzleHttp\json_encode($object, JSON_UNESCAPED_SLASHES + JSON_UNESCAPED_UNICODE);
return \GuzzleHttp\json_encode($object);
}
function fromJSON($object, $assoc=false) {