Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/Sabre/VObject/Reader.php')
-rw-r--r--3rdparty/Sabre/VObject/Reader.php12
1 files changed, 3 insertions, 9 deletions
diff --git a/3rdparty/Sabre/VObject/Reader.php b/3rdparty/Sabre/VObject/Reader.php
index 9c20e33cea0..c38afbfb632 100644
--- a/3rdparty/Sabre/VObject/Reader.php
+++ b/3rdparty/Sabre/VObject/Reader.php
@@ -42,16 +42,10 @@ class Sabre_VObject_Reader {
*/
static function read($data) {
- // Detecting line endings
- if (strpos($data,"\r\n")!==false) {
- $newLine = "\r\n";
- } elseif (strpos($data,"\r")) {
- $newLine = "\r";
- } else {
- $newLine = "\n";
- }
+ // Normalizing newlines
+ $data = str_replace(array("\r","\n\n"), array("\n","\n"), $data);
- $lines = explode($newLine, $data);
+ $lines = explode("\n", $data);
// Unfolding lines
$lines2 = array();