From 885c6e65163cc790b68de763a925af0814949b10 Mon Sep 17 00:00:00 2001 From: "Sekan, Tobias" Date: Fri, 1 Nov 2019 13:16:14 +0100 Subject: [PATCH] Fix wrong newline replacement --- htdocs/core/lib/xcal.lib.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/lib/xcal.lib.php b/htdocs/core/lib/xcal.lib.php index 67a978ec89c..0b999e7b75a 100644 --- a/htdocs/core/lib/xcal.lib.php +++ b/htdocs/core/lib/xcal.lib.php @@ -427,9 +427,9 @@ function format_cal($format, $string) if ($format === "ical") { // Replace new lines chars by "\n" - $newstring = preg_replace("/"."\r\n"."/i", "\n", $newstring); - $newstring = preg_replace("/"."\n\r"."/i", "\n", $newstring); - $newstring = preg_replace("/"."\n"."/i", "\n", $newstring); + $newstring = preg_replace("/"."\r\n"."/i", "\\n", $newstring); + $newstring = preg_replace("/"."\n\r"."/i", "\\n", $newstring); + $newstring = preg_replace("/"."\n"."/i", "\\n", $newstring); // Must not exceed 75 char. Cut with "\r\n"+Space $newstring = calEncode($newstring);