Escape tablenames, dbnames and properly render html-specific elements/chars
Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
This commit is contained in:
parent
89dfff7868
commit
21093b22e4
@ -334,22 +334,23 @@ class DbSearch
|
||||
$html_output .= '</td>';
|
||||
// Displays browse/delete link if result count > 0
|
||||
if ($res_cnt > 0) {
|
||||
$this_url_params['db'] = $GLOBALS['db'];
|
||||
$this_url_params['table'] = $each_table;
|
||||
$this_url_params['db'] = htmlspecialchars($GLOBALS['db']);
|
||||
$this_url_params['table'] = htmlspecialchars($each_table);
|
||||
$browse_result_path = 'sql.php' . PMA_URL_getCommon($this_url_params);
|
||||
$html_output .= '<td><a name="browse_search" '
|
||||
. ' class="ajax browse_results" href="'
|
||||
. $browse_result_path . '" '
|
||||
. 'data-browse-sql="' . $newsearchsqls['select_columns'] . '" '
|
||||
. 'data-table-name="' . $each_table . '" >'
|
||||
. 'data-browse-sql="'
|
||||
. htmlspecialchars($newsearchsqls['select_columns']). '" '
|
||||
. 'data-table-name="' . htmlspecialchars($each_table) . '" >'
|
||||
. __('Browse') . '</a></td>';
|
||||
|
||||
$delete_result_path = $browse_result_path;
|
||||
$html_output .= '<td><a name="delete_search" class="ajax delete_results"'
|
||||
. ' href="' . $delete_result_path . '"'
|
||||
. ' data-table-name="' . $each_table . '"'
|
||||
. ' data-delete-sql="' . $newsearchsqls['delete'] . '" >'
|
||||
. __('Delete') . '</a></td>';
|
||||
. ' data-delete-sql="' . htmlspecialchars($newsearchsqls['delete'])
|
||||
. ' data-table-name="' . htmlspecialchars($each_table) . '"'
|
||||
. '" >' . __('Delete') . '</a></td>';
|
||||
} else {
|
||||
$html_output .= '<td> </td>'
|
||||
. '<td> </td>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user