summaryrefslogtreecommitdiffstats
path: root/system/core
diff options
context:
space:
mode:
authorEric Roberts <eric@cryode.com>2013-01-28 03:10:09 +0100
committerEric Roberts <eric@cryode.com>2013-01-28 03:10:09 +0100
commitb75e13df03dcf898cc85e144b941e1b1f6c332be (patch)
tree0ac7525b7398dd5279a1976688a65800be8749cc /system/core
parent1b74e70c0cfd3aedcfa427b655e2ad3868bff531 (diff)
Fix newline standardization.
Signed-off-by: Eric Roberts <eric@cryode.com>
Diffstat (limited to 'system/core')
-rw-r--r--system/core/Input.php4
1 files 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;