From: Jakub Vrana Date: Thu, 16 Dec 2010 06:02:51 +0000 (+0100) Subject: Escape \n in JSON X-Git-Tag: v3.2.0~91 X-Git-Url: https://git.joonet.de/?a=commitdiff_plain;h=be58b9cdbc54ef7abbc915ed3994a6644351903c;p=adminer.git Escape \n in JSON --- diff --git a/adminer/include/functions.inc.php b/adminer/include/functions.inc.php index bf2e2819..cb92a789 100644 --- a/adminer/include/functions.inc.php +++ b/adminer/include/functions.inc.php @@ -510,7 +510,7 @@ function json_row($key, $val = null) { echo "{"; } if ($key != "") { - echo ($first ? "" : ",") . "\n\t\"" . addcslashes($key, '\\"') . '": ' . (isset($val) ? '"' . addcslashes($val, '\\"') . '"' : 'undefined'); + echo ($first ? "" : ",") . "\n\t\"" . addcslashes($key, "\r\n\"\\") . '": ' . (isset($val) ? '"' . addcslashes($val, "\r\n\"\\") . '"' : 'undefined'); $first = false; } else { echo "\n}\n";