From b75e13df03dcf898cc85e144b941e1b1f6c332be Mon Sep 17 00:00:00 2001 From: Eric Roberts Date: Sun, 27 Jan 2013 20:10:09 -0600 Subject: Fix newline standardization. Signed-off-by: Eric Roberts --- system/core/Input.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/core/Input.php b/system/core/Input.php index 82e22dd49..68a8fe03f 100644 --- a/system/core/Input.php +++ b/system/core/Input.php @@ -720,9 +720,9 @@ class CI_Input { } // Standardize newlines if needed - if ($this->_standardize_newlines === TRUE && strpos($str, "\r") !== FALSE) + if ($this->_standardize_newlines === TRUE) { - return str_replace(array("\r\n", "\r", "\r\n\n"), PHP_EOL, $str); + return preg_replace('/(?:\r\n|[\r\n])/', PHP_EOL, $str); } return $str; -- cgit v1.2.3-24-g4f1b