diff --git a/select.inc.php b/select.inc.php index 99fa4fad..d8e11d27 100644 --- a/select.inc.php +++ b/select.inc.php @@ -93,7 +93,7 @@ if (!mysql_num_rows($result)) { if (!isset($val)) { $val = "NULL"; } else { - $val = (strlen(trim($val)) ? htmlspecialchars($val) : " "); + $val = (strlen(trim($val)) ? nl2br(htmlspecialchars($val)) : " "); foreach ((array) $foreign_keys[$key] as $foreign_key) { if (count($foreign_keys[$key]) == 1 || count($foreign_key[2]) == 1) { $val = '">' . "$val"; diff --git a/sql.inc.php b/sql.inc.php index 422e5b42..1ff69a5a 100644 --- a/sql.inc.php +++ b/sql.inc.php @@ -6,7 +6,7 @@ if ($_POST) { } $error = mysql_error(); } -page_header(lang('SQL command'), (strlen($_GET["db"]) ? "" : "db")); +page_header(lang('SQL command')); if ($_POST) { if (!$result) { @@ -22,7 +22,7 @@ if ($_POST) { } echo ""; foreach ($row as $val) { - echo "" . (isset($val) ? htmlspecialchars($val) : "NULL") . ""; + echo "" . (isset($val) ? nl2br(htmlspecialchars($val)) : "NULL") . ""; } echo "\n"; }