mirror of
https://github.com/vrana/adminer.git
synced 2025-08-09 16:17:48 +02:00
Quote values with leading and trailing zeroes in CSV export (bug #777)
This commit is contained in:
@@ -1129,7 +1129,7 @@ function dump_headers($identifier, $multi_table = false) {
|
|||||||
*/
|
*/
|
||||||
function dump_csv($row) {
|
function dump_csv($row) {
|
||||||
foreach ($row as $key => $val) {
|
foreach ($row as $key => $val) {
|
||||||
if (preg_match("~[\"\n,;\t]~", $val) || $val === "") {
|
if (preg_match('~["\n,;\t]|^0|\.\d*0$~', $val) || $val === "") {
|
||||||
$row[$key] = '"' . str_replace('"', '""', $val) . '"';
|
$row[$key] = '"' . str_replace('"', '""', $val) . '"';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -2,6 +2,7 @@ Adminer 4.7.9-dev:
|
|||||||
Fix XSS in browsers which don't encode URL parameters (bug #775, regression from 4.7.0)
|
Fix XSS in browsers which don't encode URL parameters (bug #775, regression from 4.7.0)
|
||||||
Elasticsearch, ClickHouse: Do not print response if HTTP code is not 200
|
Elasticsearch, ClickHouse: Do not print response if HTTP code is not 200
|
||||||
Don't syntax highlight during IME composition (bug #747)
|
Don't syntax highlight during IME composition (bug #747)
|
||||||
|
Quote values with leading and trailing zeroes in CSV export (bug #777)
|
||||||
MySQL: Do not export names in quotes with sql_mode='ANSI_QUOTES' (bug #749)
|
MySQL: Do not export names in quotes with sql_mode='ANSI_QUOTES' (bug #749)
|
||||||
MySQL: Avoid error in PHP 8 when connecting to socket (PR #409)
|
MySQL: Avoid error in PHP 8 when connecting to socket (PR #409)
|
||||||
MySQL: Don't quote default value of text fields (bug #779)
|
MySQL: Don't quote default value of text fields (bug #779)
|
||||||
|
Reference in New Issue
Block a user