Fix #15363 - Remove unexpected quotes on text fields
Fixes: #15363 Pull-request: #15409 Signed-off-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
commit
6f14206810
@ -371,6 +371,12 @@ class TableStructureController extends TableController
|
||||
$this->db, $this->table, null, true
|
||||
);
|
||||
|
||||
foreach ($fields as $key => $row) {
|
||||
if ('text' === substr($row['Type'], -4)) {
|
||||
$fields[$key]['Default'] = stripcslashes(substr($row['Default'], 1, -1));
|
||||
}
|
||||
}
|
||||
|
||||
//display table structure
|
||||
$this->response->addHTML(
|
||||
$this->displayStructure(
|
||||
|
||||
@ -2077,6 +2077,8 @@ class InsertEdit
|
||||
$special_chars = Util::addMicroseconds($column['Default']);
|
||||
} elseif ($trueType == 'binary' || $trueType == 'varbinary') {
|
||||
$special_chars = bin2hex($column['Default']);
|
||||
} elseif ('text' === substr($trueType, -4)) {
|
||||
$special_chars = stripcslashes(substr($column['Default'], 1, -1));
|
||||
} else {
|
||||
$special_chars = htmlspecialchars($column['Default']);
|
||||
}
|
||||
|
||||
@ -263,6 +263,11 @@ for ($columnNumber = 0; $columnNumber < $num_fields; $columnNumber++) {
|
||||
break;
|
||||
default:
|
||||
$columnMeta['DefaultType'] = 'USER_DEFINED';
|
||||
|
||||
if ('text' === substr($columnMeta['Type'], -4)) {
|
||||
$columnMeta['Default'] = stripcslashes(substr($columnMeta['Default'], 1, -1));
|
||||
}
|
||||
|
||||
$columnMeta['DefaultValue'] = $columnMeta['Default'];
|
||||
break;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user