1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-15 11:04:02 +02:00

Escape links

This commit is contained in:
Jakub Vrana
2012-12-05 15:29:57 -08:00
parent 2fb1ebc7f1
commit f7f553a947
2 changed files with 2 additions and 1 deletions

View File

@@ -164,6 +164,7 @@ ORDER BY ORDINAL_POSITION", null, "") as $row) { //! requires MySQL 5
function selectVal($val, $link, $field) {
$return = ($val === null ? " " : $val);
$link = h($link);
if (ereg('blob|bytea', $field["type"]) && !is_utf8($val)) {
$return = lang('%d byte(s)', strlen($val));
if (ereg("^(GIF|\xFF\xD8\xFF|\x89PNG\x0D\x0A\x1A\x0A)", $val)) { // GIF|JPG|PNG, getimagetype() works with filename