From ff038c7f374e41b284c0ec95445012f826db6c18 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Tue, 5 Jan 2010 23:46:39 +0000 Subject: [PATCH] "Show BLOB contents" should display HTML code that is present in a BLOB --- ChangeLog | 2 ++ libraries/display_tbl.lib.php | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5e4b877bb..2d6a9a143 100644 --- a/ChangeLog +++ b/ChangeLog @@ -24,6 +24,8 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA - bug #2924357 [operations] Cannot rename a database that has foreign key constraints - 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) - bug [engines] Innodb_buffer_pool_pages_latched no longer returned in status diff --git a/libraries/display_tbl.lib.php b/libraries/display_tbl.lib.php index 0495e2fe2..3d84166a4 100644 --- a/libraries/display_tbl.lib.php +++ b/libraries/display_tbl.lib.php @@ -1339,7 +1339,7 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) { // fields, or we detected a PROCEDURE ANALYSE in // the query (results are reported as being // binary strings) - $row[$i] = PMA_replace_binary_contents($row[$i]); + $row[$i] = htmlspecialchars(PMA_replace_binary_contents($row[$i])); } else { // we show the BINARY message and field's size // (or maybe use a transformation) @@ -2217,7 +2217,7 @@ function PMA_handle_non_printable_contents($category, $content, $transform_funct $result = $default_function($result, array(), $meta); if (stristr($meta->type, 'BLOB') && $_SESSION['userconf']['display_blob']) { // in this case, restart from the original $content - $result = PMA_replace_binary_contents($content); + $result = htmlspecialchars(PMA_replace_binary_contents($content)); } } }