2
0
forked from Wavyzz/dolibarr

Fix wrong newline replacement

This commit is contained in:
Sekan, Tobias
2019-11-01 13:16:14 +01:00
parent 2a983a6a7c
commit 885c6e6516

View File

@@ -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);