diff options
author | Andrey Andreev <narf@bofh.bg> | 2013-01-28 08:58:07 +0100 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2013-01-28 08:58:07 +0100 |
commit | 3385d9c20ca1fe130a238fbe797f537155622e84 (patch) | |
tree | 0ac7525b7398dd5279a1976688a65800be8749cc | |
parent | 1b74e70c0cfd3aedcfa427b655e2ad3868bff531 (diff) | |
parent | b75e13df03dcf898cc85e144b941e1b1f6c332be (diff) |
Merge pull request #2198 from cryode/bug/input-newline
Fix newline standardization.
-rw-r--r-- | system/core/Input.php | 4 |
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; |