1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-08 07:36:44 +02:00

Fix displaying binary data

This commit is contained in:
Jakub Vrana
2014-09-13 11:00:00 -07:00
parent a3e1cd7bb6
commit 51986426b7

View File

@@ -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);