From b4c5dda95dbfea7f8e7551c6c378319d6a0a038d Mon Sep 17 00:00:00 2001 From: Sebastian Mendel Date: Mon, 14 May 2007 12:13:44 +0000 Subject: [PATCH] bug #1699772 Visual space bug in table name (in browser) --- db_export.php | 3 ++- db_qbe.php | 5 +++-- db_search.php | 2 +- db_structure.php | 10 +++++----- libraries/header.inc.php | 2 +- navigation.php | 3 ++- 6 files changed, 14 insertions(+), 11 deletions(-) diff --git a/db_export.php b/db_export.php index c1303871a..75305e055 100644 --- a/db_export.php +++ b/db_export.php @@ -50,7 +50,8 @@ foreach ($tables as $each_table) { } $table_html = htmlspecialchars($each_table['Name']); $multi_values .= ' ' . "\n"; + . $is_selected . '>' + . str_replace(' ', ' ', $table_html) . '' . "\n"; } // end for $multi_values .= "\n"; $multi_values .= ''; diff --git a/db_qbe.php b/db_qbe.php index b7da986f1..2c80f6103 100644 --- a/db_qbe.php +++ b/db_qbe.php @@ -166,7 +166,7 @@ function showColumnSelectCell($columns, $column_number, $selected = '') } echo ' '; echo '' . "\n"; + . str_replace(' ', ' ', htmlspecialchars($column)) . '' . "\n"; } ?> @@ -629,7 +629,8 @@ $strTableListOptions = ''; $numTableListOptions = 0; foreach ($tbl_names AS $key => $val) { $strTableListOptions .= ' '; - $strTableListOptions .= '' . "\n"; + $strTableListOptions .= '' . "\n"; $numTableListOptions++; } ?> diff --git a/db_search.php b/db_search.php index 53d8622c0..ba8f8b968 100644 --- a/db_search.php +++ b/db_search.php @@ -340,7 +340,7 @@ foreach ($tables_names_only as $each_table) { echo ' ' . "\n"; + . str_replace(' ', ' ', htmlspecialchars($each_table)) . '' . "\n"; } // end while echo ' ' . "\n"; diff --git a/db_structure.php b/db_structure.php index ba01f0925..52b5e259b 100644 --- a/db_structure.php +++ b/db_structure.php @@ -193,11 +193,11 @@ foreach ($tables as $keyname => $each_table) { || $each_table['TABLE_TYPE'] === 'SYSTEM VIEW'); $alias = (!empty($tooltip_aliasname) && isset($tooltip_aliasname[$each_table['TABLE_NAME']])) - ? htmlspecialchars($tooltip_aliasname[$each_table['TABLE_NAME']]) - : htmlspecialchars($each_table['TABLE_NAME']); + ? str_replace(' ', ' ', htmlspecialchars($tooltip_truename[$each_table['TABLE_NAME']])) + : str_replace(' ', ' ', htmlspecialchars($each_table['TABLE_NAME'])); $truename = (!empty($tooltip_truename) && isset($tooltip_truename[$each_table['TABLE_NAME']])) - ? htmlspecialchars($tooltip_truename[$each_table['TABLE_NAME']]) - : htmlspecialchars($each_table['TABLE_NAME']); + ? str_replace(' ', ' ', htmlspecialchars($tooltip_truename[$each_table['TABLE_NAME']])) + : str_replace(' ', ' ', htmlspecialchars($each_table['TABLE_NAME'])); // Sets parameters for links $tbl_url_query = $url_query . '&table=' . $table_encoded; @@ -240,7 +240,7 @@ foreach ($tables as $keyname => $each_table) { . ' ' . PMA_backquote($each_table['TABLE_NAME']); $drop_message = sprintf( $table_is_view ? $strViewHasBeenDropped : $strTableHasBeenDropped, - htmlspecialchars($each_table['TABLE_NAME'])); + str_replace(' ', ' ', htmlspecialchars($each_table['TABLE_NAME']))); } // loic1: Patch from Joshua Nye to get valid diff --git a/libraries/header.inc.php b/libraries/header.inc.php index 53b4fdc10..ed52691f2 100644 --- a/libraries/header.inc.php +++ b/libraries/header.inc.php @@ -216,7 +216,7 @@ if (empty($GLOBALS['is_header_sent'])) { printf($item, $GLOBALS['cfg']['DefaultTabTable'], PMA_generate_common_url($GLOBALS['db'], $GLOBALS['table']), - htmlspecialchars($GLOBALS['table']), + str_replace(' ', ' ', htmlspecialchars($GLOBALS['table'])), (isset($GLOBALS['tbl_is_view']) && $GLOBALS['tbl_is_view'] ? $GLOBALS['strView'] : $GLOBALS['strTable']), (isset($GLOBALS['tbl_is_view']) && $GLOBALS['tbl_is_view'] ? 'b_views' : 's_tbl') . '.png'); diff --git a/navigation.php b/navigation.php index 5f57e77de..b5aabdc31 100644 --- a/navigation.php +++ b/navigation.php @@ -558,7 +558,8 @@ function PMA_displayTableList($tables, $visible = false, .'' - . htmlspecialchars($table['disp_name']) . ''; + // preserve spaces in table name + . str_replace(' ', ' ', htmlspecialchars($table['disp_name'])) . ''; echo '' . "\n"; } }