bug #1699772 Visual space bug in table name (in browser)

This commit is contained in:
Sebastian Mendel
2007-05-14 12:13:44 +00:00
parent 84b9a15a0e
commit b4c5dda95d
6 changed files with 14 additions and 11 deletions

View File

@@ -50,7 +50,8 @@ foreach ($tables as $each_table) {
}
$table_html = htmlspecialchars($each_table['Name']);
$multi_values .= ' <option value="' . $table_html . '"'
. $is_selected . '>' . $table_html . '</option>' . "\n";
. $is_selected . '>'
. str_replace(' ', '&nbsp;', $table_html) . '</option>' . "\n";
} // end for
$multi_values .= "\n";
$multi_values .= '</select></div>';

View File

@@ -166,7 +166,7 @@ function showColumnSelectCell($columns, $column_number, $selected = '')
}
echo ' ';
echo '<option value="' . htmlspecialchars($column) . '"' . $sel . '>'
. htmlspecialchars($column) . '</option>' . "\n";
. str_replace(' ', '&nbsp;', htmlspecialchars($column)) . '</option>' . "\n";
}
?>
</select>
@@ -629,7 +629,8 @@ $strTableListOptions = '';
$numTableListOptions = 0;
foreach ($tbl_names AS $key => $val) {
$strTableListOptions .= ' ';
$strTableListOptions .= '<option value="' . htmlspecialchars($key) . '"' . $val . '>' . htmlspecialchars($key) . '</option>' . "\n";
$strTableListOptions .= '<option value="' . htmlspecialchars($key) . '"' . $val . '>'
. str_replace(' ', '&nbsp;', htmlspecialchars($key)) . '</option>' . "\n";
$numTableListOptions++;
}
?>

View File

@@ -340,7 +340,7 @@ foreach ($tables_names_only as $each_table) {
echo ' <option value="' . htmlspecialchars($each_table) . '"'
. $is_selected . '>'
. htmlspecialchars($each_table) . '</option>' . "\n";
. str_replace(' ', '&nbsp;', htmlspecialchars($each_table)) . '</option>' . "\n";
} // end while
echo ' </select>' . "\n";

View File

@@ -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(' ', '&nbsp;', htmlspecialchars($tooltip_truename[$each_table['TABLE_NAME']]))
: str_replace(' ', '&nbsp;', 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(' ', '&nbsp;', htmlspecialchars($tooltip_truename[$each_table['TABLE_NAME']]))
: str_replace(' ', '&nbsp;', htmlspecialchars($each_table['TABLE_NAME']));
// Sets parameters for links
$tbl_url_query = $url_query . '&amp;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(' ', '&nbsp;', htmlspecialchars($each_table['TABLE_NAME'])));
}
// loic1: Patch from Joshua Nye <josh at boxcarmedia.com> to get valid

View File

@@ -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(' ', '&nbsp;', 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');

View File

@@ -558,7 +558,8 @@ function PMA_displayTableList($tables, $visible = false,
.'<a href="' . $href . '" title="' . htmlspecialchars($table['Comment']
.' (' . PMA_formatNumber($table['Rows'], 0) . ' ' . $GLOBALS['strRows']) . ')"'
.' id="' . htmlspecialchars($table_db . '.' . $table['Name']) . '">'
. htmlspecialchars($table['disp_name']) . '</a>';
// preserve spaces in table name
. str_replace(' ', '&nbsp;', htmlspecialchars($table['disp_name'])) . '</a>';
echo '</li>' . "\n";
}
}