diff --git a/www/class/config-generate-remote/Abstracts/AbstractObject.php b/www/class/config-generate-remote/Abstracts/AbstractObject.php index e52a5a9dc8b..22510cd4c79 100644 --- a/www/class/config-generate-remote/Abstracts/AbstractObject.php +++ b/www/class/config-generate-remote/Abstracts/AbstractObject.php @@ -162,9 +162,9 @@ protected function writeObject(array $object): void $append = ''; for ($i = 0; $i < count($this->attributesWrite); $i++) { if (isset($object[$this->attributesWrite[$i]]) && strlen($object[$this->attributesWrite[$i]])) { - $line .= $append . $object[$this->attributesWrite[$i]]; + $line .= $append . '"' . str_replace('"', '""', $object[$this->attributesWrite[$i]]) . '"'; } else { - $line .= $append . 'NULL'; + $line .= $append . '\N'; } $append = $this->fieldSeparatorInfile; } diff --git a/www/class/config-generate-remote/Manifest.php b/www/class/config-generate-remote/Manifest.php index 85fc1625b43..8b19d884a29 100644 --- a/www/class/config-generate-remote/Manifest.php +++ b/www/class/config-generate-remote/Manifest.php @@ -44,8 +44,8 @@ protected function __construct(\Pimple\Container $dependencyInjector) 'infile_clauses' => [ 'fields_clause' => [ 'terminated_by' => $this->fieldSeparatorInfile, - 'enclosed_by' => '', - 'escaped_by' => '', + 'enclosed_by' => '"', + 'escaped_by' => '\\\\', ], 'lines_clause' => [ 'terminated_by' => $this->lineSeparatorInfile,