From ea50288fcad8a99d6cf67eb1ff9ccd7f622df486 Mon Sep 17 00:00:00 2001 From: "Ann + J.M" Date: Sat, 29 Mar 2014 21:34:08 +0100 Subject: [PATCH] Fix #4345 Privileges editor shows databases with underscore backslash-escaped Signed-off-by: Ann + J.M --- libraries/server_privileges.lib.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/libraries/server_privileges.lib.php b/libraries/server_privileges.lib.php index aa72a282fc..a0eaae9092 100644 --- a/libraries/server_privileges.lib.php +++ b/libraries/server_privileges.lib.php @@ -2485,7 +2485,7 @@ function PMA_getLinkToDbAndTable($url_dbname, $dbname, $tablename) ) ) . '">' - . htmlspecialchars($dbname) . ': ' + . htmlspecialchars(stripslashes($dbname)) . ': ' . PMA_Util::getTitleForTarget( $GLOBALS['cfg']['DefaultTabDatabase'] ) @@ -2640,7 +2640,7 @@ function PMA_getHtmlForDisplayUserRightsInRows($db_rights, $dbname, $html_output .= '' . "\n" . '' . htmlspecialchars( - (! strlen($dbname)) ? $row['Db'] : $row['Table_name'] + (! strlen($dbname)) ? stripslashes($row['Db']) : $row['Table_name'] ) . '' . "\n" . '' . "\n" @@ -2742,7 +2742,7 @@ function PMA_getTableForDisplayAllTableSpecificRights( // table body // get data - // we also want privielgs for this user not in table `db` but in other table + // we also want privileges for this user not in table `db` but in other table $tables = $GLOBALS['dbi']->fetchResult('SHOW TABLES FROM `mysql`;'); /** @@ -3726,13 +3726,14 @@ function PMA_getHtmlHeaderForDisplayUserProperties( 'tablename' => '', ) ) - . '">' . htmlspecialchars($dbname) + . '">' . htmlspecialchars(stripslashes($dbname)) . ''; $html_output .= ' - ' . __('Table') . ' ' . htmlspecialchars($tablename) . ''; } else { - $html_output .= ' ' . htmlspecialchars($dbname) . ''; + $html_output .= ' ' . htmlspecialchars(stripslashes($dbname)) + . ''; } } else {