Allow using json_row() in HTML
This commit is contained in:
parent
352f29804e
commit
be6b7c6cac
|
@ -220,7 +220,7 @@ function json_row($key, $val = null) {
|
|||
echo "{";
|
||||
}
|
||||
if ($key != "") {
|
||||
echo ($first ? "" : ",") . "\n\t\"" . addcslashes($key, "\r\n\"\\") . '": ' . ($val !== null ? '"' . addcslashes($val, "\r\n\"\\") . '"' : 'undefined');
|
||||
echo ($first ? "" : ",") . "\n\t\"" . addcslashes($key, "\r\n\"\\/") . '": ' . ($val !== null ? '"' . addcslashes($val, "\r\n\"\\/") . '"' : 'undefined');
|
||||
$first = false;
|
||||
} else {
|
||||
echo "\n}\n";
|
||||
|
|
Loading…
Reference in a new issue