} elseif (!strlen($val)) {
$val = " "; // some content to print a border
} else {
- $val = whitespace(h($val));
+ $val = h($val);
if ($types[$key] == 254) {
$val = "<code>$val</code>";
}
echo " <input type='image' name='drop_col[$i]' src='../adminer/static/cross.gif' alt='x' title='" . lang('Remove') . "' onclick='return !editing_remove_row(this);'>";
echo " <input type='image' name='up[$i]' src='../adminer/static/up.gif' alt='^' title='" . lang('Move up') . "'>";
echo " <input type='image' name='down[$i]' src='../adminer/static/down.gif' alt='v' title='" . lang('Move down') . "'>";
- echo "\n\n";
+ echo "\n";
}
return $column_comments;
}
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
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
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; }