]> git.joonet.de Git - adminer.git/commitdiff
Avoid double escaping in script=db (thanks to trestna smradlavice)
authorJakub Vrana <jakub@vrana.cz>
Mon, 12 Jan 2015 17:46:53 +0000 (09:46 -0800)
committerJakub Vrana <jakub@vrana.cz>
Mon, 12 Jan 2015 17:46:53 +0000 (09:46 -0800)
adminer/script.inc.php

index 62df6eaea423cc9fd50c434d0655f619453a5c1f..d36f03df1b7a9ef213686f4c4bcfebdba04011cd 100644 (file)
@@ -4,16 +4,15 @@ header("Content-Type: text/javascript; charset=utf-8");
 if ($_GET["script"] == "db") {
        $sums = array("Data_length" => 0, "Index_length" => 0, "Data_free" => 0);
        foreach (table_status() as $name => $table_status) {
-               $id = js_escape($name);
-               json_row("Comment-$id", nbsp($table_status["Comment"]));
+               json_row("Comment-$name", nbsp($table_status["Comment"]));
                if (!is_view($table_status)) {
                        foreach (array("Engine", "Collation") as $key) {
-                               json_row("$key-$id", nbsp($table_status[$key]));
+                               json_row("$key-$name", nbsp($table_status[$key]));
                        }
                        foreach ($sums + array("Auto_increment" => 0, "Rows" => 0) as $key => $val) {
                                if ($table_status[$key] != "") {
                                        $val = format_number($table_status[$key]);
-                                       json_row("$key-$id", ($key == "Rows" && $val && $table_status["Engine"] == ($sql == "pgsql" ? "table" : "InnoDB")
+                                       json_row("$key-$name", ($key == "Rows" && $val && $table_status["Engine"] == ($sql == "pgsql" ? "table" : "InnoDB")
                                                ? "~ $val"
                                                : $val
                                        ));
@@ -22,7 +21,7 @@ if ($_GET["script"] == "db") {
                                                $sums[$key] += ($table_status["Engine"] != "InnoDB" || $key != "Data_free" ? $table_status[$key] : 0);
                                        }
                                } elseif (array_key_exists($key, $table_status)) {
-                                       json_row("$key-$id");
+                                       json_row("$key-$name");
                                }
                        }
                }