Fixes: #15831 Pull-request: #15849 Signed-off-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
commit
7dd193aa7b
@ -2858,7 +2858,7 @@ class Util
|
||||
*/
|
||||
public static function convertBitDefaultValue($bit_default_value)
|
||||
{
|
||||
return rtrim(ltrim(htmlspecialchars_decode($bit_default_value, ENT_QUOTES), "b'"), "'");
|
||||
return preg_replace("/^b'(\d*)'?$/", '$1', htmlspecialchars_decode($bit_default_value, ENT_QUOTES), 1);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -483,6 +483,22 @@ class UtilTest extends PmaTestCase
|
||||
"b'010111010'",
|
||||
"010111010",
|
||||
],
|
||||
"database name starting with b" => [
|
||||
"big database",
|
||||
"big database",
|
||||
],
|
||||
"database name containing b'" => [
|
||||
"a b'ig database",
|
||||
"a b'ig database",
|
||||
],
|
||||
"database name in single quotes" => [
|
||||
"'a*database*name'",
|
||||
"'a*database*name'",
|
||||
],
|
||||
"database name with multiple b'" => [
|
||||
"b'ens datab'ase'",
|
||||
"b'ens datab'ase'",
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user