From 51986426b766b69683fd1724379b86e5037a24a8 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Sat, 13 Sep 2014 11:00:00 -0700 Subject: [PATCH] Fix displaying binary data --- adminer/include/functions.inc.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/adminer/include/functions.inc.php b/adminer/include/functions.inc.php index 96d4713b..69b0ad16 100644 --- a/adminer/include/functions.inc.php +++ b/adminer/include/functions.inc.php @@ -1137,7 +1137,9 @@ function select_value($val, $link, $field, $text_length) { if ($return !== null) { if ($return === "") { // === - may be int $return = " "; - } elseif ($text_length != "" && is_shortable($field) && is_utf8($return)) { + } elseif (!is_utf8($return)) { + $return = "\0"; // htmlspecialchars of binary data returns an empty string + } elseif ($text_length != "" && is_shortable($field)) { $return = shorten_utf8($return, max(0, +$text_length)); // usage of LEFT() would reduce traffic but complicate query - expected average speedup: .001 s VS .01 s on local network } else { $return = h($return);