From 1a2a159a28e841f174306be07dcbf757b501efd5 Mon Sep 17 00:00:00 2001 From: David Grudl Date: Sat, 4 Feb 2017 02:43:36 +0100 Subject: [PATCH 1/3] composer: requires nette/application --- composer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/composer.json b/composer.json index f237cdd..351e2f1 100644 --- a/composer.json +++ b/composer.json @@ -25,6 +25,7 @@ } }, "require": { + "nette/application" : "^2.3|^2.4", "nette/http" : "^2.3|^2.4", "nette/utils" : "^2.3|^2.4" }, From 281d89d9ea657a4fdcddfa9ad4ed97a8176fea3a Mon Sep 17 00:00:00 2001 From: "j.patus" Date: Mon, 13 Mar 2017 15:40:56 +0100 Subject: [PATCH 2/3] Fix CSV handling for Nette 2.x branch --- src/CSVResponse.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/CSVResponse.php b/src/CSVResponse.php index fae8dd9..fb8a1c6 100644 --- a/src/CSVResponse.php +++ b/src/CSVResponse.php @@ -129,6 +129,11 @@ public function send(Nette\Http\IRequest $httpRequest, Nette\Http\IResponse $htt $delimiter = '"' . $this->delimiter . '"'; foreach ($this->data as $row) { + + $row = array_map(function($value) { + return str_replace('"', '""', $value); + }, $row); + if (strtolower($this->output_encoding) == 'utf-8') { echo('"' . implode($delimiter, (array) $row) . '"'); } else { From dc010bf5308e565314e69eca6c5d6709a4dea087 Mon Sep 17 00:00:00 2001 From: Juraj Date: Tue, 14 Mar 2017 10:08:51 +0100 Subject: [PATCH 3/3] Remove unnecessary requirement --- composer.json | 1 - 1 file changed, 1 deletion(-) diff --git a/composer.json b/composer.json index 351e2f1..f237cdd 100644 --- a/composer.json +++ b/composer.json @@ -25,7 +25,6 @@ } }, "require": { - "nette/application" : "^2.3|^2.4", "nette/http" : "^2.3|^2.4", "nette/utils" : "^2.3|^2.4" },