]> git.joonet.de Git - adminer.git/commitdiff
Quote JavaScript strings (thanks to bene)
authorJakub Vrana <jakub@vrana.cz>
Sat, 16 Oct 2010 13:36:23 +0000 (15:36 +0200)
committerJakub Vrana <jakub@vrana.cz>
Sat, 16 Oct 2010 13:36:23 +0000 (15:36 +0200)
adminer/script.inc.php

index d60f89c93ddd0826c30fe96fb7a5c104f3a8e246..3d872b46f5f42dff7cd7caca211968f8cdc6a542 100644 (file)
@@ -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] != "") {