diff --git a/ChangeLog b/ChangeLog
index 373736065e..8411f2875e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,7 @@ values
- bug #3898 Structure not refreshed after column drop
- bug #3926 View is not updatable
- bug #3919 PropertiesIconic not honored
+- bug #3930 Databases to choose for specific privileges show up escaped
4.0.1.0 (not yet released)
- bug #3879 Import broken for CSV using LOAD DATA
diff --git a/libraries/server_privileges.lib.php b/libraries/server_privileges.lib.php
index d0cc5bb421..7933d24ed6 100644
--- a/libraries/server_privileges.lib.php
+++ b/libraries/server_privileges.lib.php
@@ -2273,14 +2273,15 @@ function PMA_getHTmlForDisplaySelectDbInEditPrivs($found_rows)
. '' . "\n";
foreach ($pred_db_array as $current_db) {
+ $current_db_show = $current_db;
$current_db = PMA_Util::escapeMysqlWildcards($current_db);
// cannot use array_diff() once, outside of the loop,
// because the list of databases has special characters
// already escaped in $found_rows,
// contrary to the output of SHOW DATABASES
- if (empty($found_rows) || ! in_array($current_db, $found_rows)) {
+ if (empty($found_rows) || ! in_array($current_db_show, $found_rows)) {
$html_output .= '' . "\n";
+ . htmlspecialchars($current_db_show) . '' . "\n";
}
}
$html_output .= '' . "\n";