bug #1989281 [export] CSV for MS Excel incorrect escaping of double quotes
This commit is contained in:
@@ -75,6 +75,7 @@ danbarry
|
|||||||
- bug #1992628 [parser] SQL parser removes essential space
|
- bug #1992628 [parser] SQL parser removes essential space
|
||||||
- bug #1989281 [export] Export fails if one table is marked as crashed
|
- bug #1989281 [export] Export fails if one table is marked as crashed
|
||||||
- bug #2001005 [GUI] ARCHIVE cannot have indexes
|
- bug #2001005 [GUI] ARCHIVE cannot have indexes
|
||||||
|
- bug #1989281 [export] CSV for MS Excel incorrect escaping of double quotes
|
||||||
|
|
||||||
2.11.7.0 (2008-06-23)
|
2.11.7.0 (2008-06-23)
|
||||||
- bug #1908719 [interface] New field cannot be auto-increment and primary key
|
- bug #1908719 [interface] New field cannot be auto-increment and primary key
|
||||||
|
@@ -184,9 +184,17 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query) {
|
|||||||
$schema_insert .= $row[$j];
|
$schema_insert .= $row[$j];
|
||||||
} else {
|
} else {
|
||||||
// also double the escape string if found in the data
|
// also double the escape string if found in the data
|
||||||
$schema_insert .= $csv_enclosed
|
if ('csv' == $what) {
|
||||||
|
$schema_insert .= $csv_enclosed
|
||||||
. str_replace($csv_enclosed, $csv_escaped . $csv_enclosed, str_replace($csv_escaped, $csv_escaped . $csv_escaped, $row[$j]))
|
. str_replace($csv_enclosed, $csv_escaped . $csv_enclosed, str_replace($csv_escaped, $csv_escaped . $csv_escaped, $row[$j]))
|
||||||
. $csv_enclosed;
|
. $csv_enclosed;
|
||||||
|
} else {
|
||||||
|
// for excel, avoid a problem when a field contains
|
||||||
|
// double quotes
|
||||||
|
$schema_insert .= $csv_enclosed
|
||||||
|
. str_replace($csv_enclosed, $csv_escaped . $csv_enclosed, $row[$j])
|
||||||
|
. $csv_enclosed;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$schema_insert .= '';
|
$schema_insert .= '';
|
||||||
|
Reference in New Issue
Block a user