summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruno Barão <brunobarao@gmail.com>2012-10-08 17:31:46 +0200
committerBruno Barão <brunobarao@gmail.com>2012-10-08 17:31:46 +0200
commit51f72cda43e4f7aa9cafbf31181e67c31936a0bd (patch)
tree8e7121bb64374f37c1edb304284369ab764e867f
parent02561acf13f19881f4e3f95cf2fb423665d5ce8b (diff)
Fix email headers when using long email subjects and \r\n as crlf. (Part2)
- Better expression for the preg_replace. - Added a entry to the changelog.
-rw-r--r--system/libraries/Email.php4
-rw-r--r--user_guide_src/source/changelog.rst1
2 files changed, 3 insertions, 2 deletions
diff --git a/system/libraries/Email.php b/system/libraries/Email.php
index 507067f42..4adf9430f 100644
--- a/system/libraries/Email.php
+++ b/system/libraries/Email.php
@@ -1237,7 +1237,7 @@ class CI_Email {
// wrap each line with the shebang, charset, and transfer encoding
// the preceding space on successive lines is required for header "folding"
- return trim(preg_replace('/^(.*?)(\n|\r)*$/m', ' =?'.$this->charset.'?Q?$1?=$2', $output.$temp));
+ return trim(preg_replace('/^(.*?)(\r*)$/m', ' =?'.$this->charset.'?Q?$1?=$2', $output.$temp));
}
// --------------------------------------------------------------------
@@ -1861,4 +1861,4 @@ class CI_Email {
}
/* End of file Email.php */
-/* Location: ./system/libraries/Email.php */ \ No newline at end of file
+/* Location: ./system/libraries/Email.php */
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst
index 47429aed3..50bf2c304 100644
--- a/user_guide_src/source/changelog.rst
+++ b/user_guide_src/source/changelog.rst
@@ -243,6 +243,7 @@ Release Date: Not Released
Bug fixes for 3.0
------------------
+- Fixed a bug (#1709) where the email headers were broken when using long email subjects and \r\n as crlf.
- Fixed a bug where ``unlink()`` raised an error if cache file did not exist when you try to delete it.
- Fixed a bug (#181) where a mis-spelling was in the form validation language file.
- Fixed a bug (#159, #163) that mishandled Query Builder nested transactions because _trans_depth was not getting incremented.