Fix newline standardization.
Signed-off-by: Eric Roberts <eric@cryode.com>
diff --git a/system/core/Input.php b/system/core/Input.php
index 82e22dd..68a8fe0 100644
--- a/system/core/Input.php
+++ b/system/core/Input.php
@@ -720,9 +720,9 @@
}
// 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;