Permalink
Browse files

Print \n as <br />, not &nbsp;

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@736 7c3ca157-0c34-0410-bff1-cbf682f78f5c
  • Loading branch information...
jakubvrana
jakubvrana committed Jun 21, 2009
1 parent 52f68a6 commit a69fff7e719cb36f9cec4282480f285f3cafd01f
Showing with 2 additions and 2 deletions.
  1. +1 −1 adminer/include/functions.inc.php
  2. +1 −1 adminer/select.inc.php
@@ -207,7 +207,7 @@ function select($result, $dbh2 = null) {
} else {
if ($blobs[$key] && !is_utf8($val)) {
$val = "<i>" . lang('%d byte(s)', strlen($val)) . "</i>"; //! link to download
- } elseif (!strlen(trim($val))) {
+ } elseif (!strlen(trim($val, " \t"))) {
$val = "&nbsp;"; // some content to print a border
} else {
$val = nl2br(htmlspecialchars($val));
View
@@ -263,7 +263,7 @@
} elseif (preg_match('~blob|binary~', $fields[$key]["type"]) && !is_utf8($val)) {
$val = '<a href="' . htmlspecialchars($SELF) . 'download=' . urlencode($_GET["select"]) . '&amp;field=' . urlencode($key) . '&amp;' . $unique_idf . '">' . lang('%d byte(s)', strlen($val)) . '</a>';
} else {
- if (!strlen(trim($val))) {
+ if (!strlen(trim($val, " \t"))) {
$val = "&nbsp;";
} elseif (intval($text_length) > 0 && preg_match('~blob|text~', $fields[$key]["type"])) {
$val = nl2br(shorten_utf8($val, intval($text_length)));

0 comments on commit a69fff7

Please sign in to comment.