"Show BLOB contents" should display HTML code that is present in a BLOB

This commit is contained in:
Marc Delisle
2010-01-05 23:46:39 +00:00
parent db93a7fb0d
commit b10d8c63ab
2 changed files with 4 additions and 2 deletions

View File

@@ -68,6 +68,8 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA
- bug #2924357 [operations] Cannot rename a database that has foreign key - bug #2924357 [operations] Cannot rename a database that has foreign key
constraints constraints
- bug #869006 [structure] Ignore number of records for MRG_MyISAM tables - bug #869006 [structure] Ignore number of records for MRG_MyISAM tables
- bug [browse] "Show BLOB contents" should display HTML code that is present
in a BLOB, thanks to Vincent van der Tuin
3.2.4.0 (2009-12-02) 3.2.4.0 (2009-12-02)
- bug [engines] Innodb_buffer_pool_pages_latched no longer returned in status - bug [engines] Innodb_buffer_pool_pages_latched no longer returned in status

View File

@@ -1371,7 +1371,7 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) {
$row[$i] = bin2hex($row[$i]); $row[$i] = bin2hex($row[$i]);
} }
else { else {
$row[$i] = PMA_replace_binary_contents($row[$i]); $row[$i] = htmlspecialchars(PMA_replace_binary_contents($row[$i]));
} }
} else { } else {
// we show the BINARY message and field's size // we show the BINARY message and field's size
@@ -2266,7 +2266,7 @@ function PMA_handle_non_printable_contents($category, $content, $transform_funct
$result = $default_function($result, array(), $meta); $result = $default_function($result, array(), $meta);
if (stristr($meta->type, 'BLOB') && $_SESSION['tmp_user_values']['display_blob']) { if (stristr($meta->type, 'BLOB') && $_SESSION['tmp_user_values']['display_blob']) {
// in this case, restart from the original $content // in this case, restart from the original $content
$result = PMA_replace_binary_contents($content); $result = htmlspecialchars(PMA_replace_binary_contents($content));
} }
} }
} }