Fix bug #3885 display_binary_as_hex option causes unexpected behavior

This commit is contained in:
J.M 2013-04-28 19:15:49 +02:00
parent 32ccd01b64
commit b39fbb4d46
2 changed files with 34 additions and 15 deletions

View File

@ -8,6 +8,7 @@ phpMyAdmin - ChangeLog
- bug #3891 [import] Server upload folder import file name missing in success message
+ rfe #1421 [auth] Add retry button on connection failure with config auth
+ rfe #1422 [interface] Provide feedback if no columns selected for multi-submit
- bug #3885 [browse] display_binary_as_hex option causes unexpected behavior
4.0.0.0 (not yet released)
+ Patch #3481047 for rfe #3480477 Insert as new row enhancement

View File

@ -3771,11 +3771,17 @@ class PMA_DisplayResults
) {
$wkbval = PMA_substr(bin2hex($column), 8);
} else {
$wkbval = htmlspecialchars(
PMA_Util::replaceBinaryContents(
$column
)
);
// force hex display for PHP < 5.4, no ENT_SUBSTITUTE
if (PMA_PHP_INT_VERSION < 50400) {
$wkbval = bin2hex($column);
} else {
$wkbval = htmlspecialchars(
PMA_Util::replaceBinaryContents(
$column
),
ENT_SUBSTITUTE
);
}
}
if ((PMA_strlen($wkbval) > $GLOBALS['cfg']['LimitChars'])
@ -3899,11 +3905,17 @@ class PMA_DisplayResults
) {
$column = bin2hex($column);
} else {
$column = htmlspecialchars(
PMA_Util::replaceBinaryContents(
$column
)
);
// force hex display for PHP < 5.4, no ENT_SUBSTITUTE
if (PMA_PHP_INT_VERSION < 50400) {
$column = bin2hex($column);
} else {
$column = htmlspecialchars(
PMA_Util::replaceBinaryContents(
$column
),
ENT_SUBSTITUTE
);
}
}
} else {
@ -5429,11 +5441,17 @@ class PMA_DisplayResults
&& $_SESSION['tmp_user_values']['display_blob']
) {
// in this case, restart from the original $content
$result = htmlspecialchars(
PMA_Util::replaceBinaryContents(
$content
)
);
// force hex display for PHP < 5.4, no ENT_SUBSTITUTE
if (PMA_PHP_INT_VERSION < 50400) {
$result = bin2hex($content);
} else {
$result = htmlspecialchars(
PMA_Util::replaceBinaryContents(
$content
),
ENT_SUBSTITUTE
);
}
}
/* Create link to download */