diff --git a/adminer/include/editing.inc.php b/adminer/include/editing.inc.php index 8aa7f068..e631b421 100644 --- a/adminer/include/editing.inc.php +++ b/adminer/include/editing.inc.php @@ -56,7 +56,7 @@ function select($result, $connection2 = null) { } elseif (!strlen($val)) { $val = " "; // some content to print a border } else { - $val = whitespace(h($val)); + $val = h($val); if ($types[$key] == 254) { $val = "$val"; } @@ -188,7 +188,7 @@ if ($type == "PROCEDURE") { echo " "; echo " "; echo " "; - echo "\n\n"; + echo "\n"; } return $column_comments; } diff --git a/adminer/include/functions.inc.php b/adminer/include/functions.inc.php index 304bc1ac..2140e818 100644 --- a/adminer/include/functions.inc.php +++ b/adminer/include/functions.inc.php @@ -43,14 +43,6 @@ function h($string) { return htmlspecialchars($string, ENT_QUOTES); } -/** Convert text whitespace to HTML -* @param string -* @return string -*/ -function whitespace($string) { - return nl2br(preg_replace('~(^| ) ~m', '\\1 ', str_replace("\t", " ", $string))); -} - /** Escape for TD * @param string * @return string diff --git a/adminer/select.inc.php b/adminer/select.inc.php index de6d4634..1bd75b52 100644 --- a/adminer/select.inc.php +++ b/adminer/select.inc.php @@ -212,9 +212,9 @@ if (!$columns) { if (!strlen($val)) { $val = " "; } elseif (strlen($text_length) && ereg('text|blob', $field["type"]) && is_utf8($val)) { - $val = whitespace(shorten_utf8($val, max(0, intval($text_length)))); // usage of LEFT() would reduce traffic but complicate query + $val = shorten_utf8($val, max(0, intval($text_length))); // usage of LEFT() would reduce traffic but complicate query } else { - $val = whitespace(h($val)); + $val = h($val); } if (!$link) { // link related items diff --git a/adminer/static/default.css b/adminer/static/default.css index 2c1b3e3a..097ae98f 100644 --- a/adminer/static/default.css +++ b/adminer/static/default.css @@ -18,7 +18,7 @@ code { background: #eee; } tr:hover td, tr:hover th { background: #ddf; } .version { color: #777; font-size: 67%; } .js .hidden { display: none; } -.nowrap { white-space: nowrap; } +.nowrap { white-space: pre; } .wrap { white-space: normal; } .error { color: red; background: #fee; } .message { color: green; background: #efe; }