]> git.joonet.de Git - adminer.git/commitdiff
Print \n as <br />, not &nbsp;
authorjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Sun, 21 Jun 2009 23:41:28 +0000 (23:41 +0000)
committerjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Sun, 21 Jun 2009 23:41:28 +0000 (23:41 +0000)
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@736 7c3ca157-0c34-0410-bff1-cbf682f78f5c

adminer/include/functions.inc.php
adminer/select.inc.php

index 39dd099c3cd584a16a18fa88916e0c3b84005e55..f1daceb7c269d73ca5e00f269cd00b99bc852079 100644 (file)
@@ -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));
index dff0f66bf6a3de5da0a2796b1f0560c14f10e759..69fb8af737bf1a18e47c7ada52560320c701f82b 100644 (file)
@@ -263,7 +263,7 @@ if (!$columns) {
                                        } 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)));