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.'"'; }