From faa6e7edd7b4a5192c74c1c284cb15aba36f2bcb Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Sat, 16 Oct 2010 15:36:23 +0200 Subject: [PATCH] Quote JavaScript strings (thanks to bene) --- adminer/script.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/adminer/script.inc.php b/adminer/script.inc.php index d60f89c9..3d872b46 100644 --- a/adminer/script.inc.php +++ b/adminer/script.inc.php @@ -5,10 +5,10 @@ if ($_GET["script"] == "db") { $sums = array("Data_length" => 0, "Index_length" => 0, "Data_free" => 0); foreach (table_status() as $row) { $id = addcslashes($row["Name"], "\\'/"); - echo "setHtml('Comment-$id', '" . nbsp($row["Comment"]) . "');\n"; + echo "setHtml('Comment-$id', '" . addcslashes(nbsp($row["Comment"]), "'\\") . "');\n"; if (!is_view($row)) { foreach (array("Engine", "Collation") as $key) { - echo "setHtml('$key-$id', '" . nbsp($row[$key]) . "');\n"; + echo "setHtml('$key-$id', '" . addcslashes(nbsp($row[$key]), "'\\") . "');\n"; } foreach ($sums + array("Auto_increment" => 0, "Rows" => 0) as $key => $val) { if ($row[$key] != "") {