From 846b120b3434c7bc5c23b78f9c6ede34cfa6f603 Mon Sep 17 00:00:00 2001 From: esensar Date: Wed, 1 Jun 2016 00:01:09 +0200 Subject: [PATCH] Last newline test --- gori.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gori.php b/gori.php index bfa7005..f0f8a39 100644 --- a/gori.php +++ b/gori.php @@ -15,8 +15,7 @@ if(isset($_POST['vijest'])) { $vijestiFile = file_get_contents($openShiftFolder."vijesti.csv"); $vijest = $_POST['vijest']; - $vijest = str_replace("\n", "
", $vijest); - if(strpos($vijest, ',') !== FALSE) { + if(strpos($vijest, ',') !== FALSE || strpos($vijest, '\n') !== FALSE) { $vijest = str_replace('"', '""', $vijest); $vijest = '"'.$vijest.'"'; }