Skip to content

Commit

Permalink
Merge pull request bcit-ci#1945 from GDmac/develop
Browse files Browse the repository at this point in the history
  • Loading branch information
narfbg committed Oct 30, 2012
2 parents 7676c2d + e1e956d commit 936a8fe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
9 changes: 6 additions & 3 deletions system/libraries/Email.php
Expand Up @@ -770,6 +770,9 @@ protected function _get_alt_message()
$body = str_replace(str_repeat("\n", $i), "\n\n", $body);
}

// Reduce multiple spaces
$str = preg_replace('| +|', ' ', $str);

return ($this->wordwrap)
? $this->word_wrap($body, 76)
: $body;
Expand All @@ -792,15 +795,15 @@ public function word_wrap($str, $charlim = NULL)
$charlim = empty($this->wrapchars) ? 76 : $this->wrapchars;
}

// Reduce multiple spaces
$str = preg_replace('| +|', ' ', $str);

// Standardize newlines
if (strpos($str, "\r") !== FALSE)
{
$str = str_replace(array("\r\n", "\r"), "\n", $str);
}

// Reduce multiple spaces at end of line
$str = preg_replace('| +\n|', "\n", $str);

// If the current word is surrounded by {unwrap} tags we'll
// strip the entire chunk and replace it with a marker.
$unwrap = array();
Expand Down
1 change: 1 addition & 0 deletions user_guide_src/source/changelog.rst
Expand Up @@ -400,6 +400,7 @@ Bug fixes for 3.0
- Fixed a bug (#142) - :doc:`Form Helper <helpers/form_helper>` function ``form_dropdown()`` didn't escape HTML entities in option values.
- Fixed a bug (#50) - :doc:`Session Library <libraries/sessions>` unnecessarily stripped slashed from serialized data, making it impossible to read objects in a namespace.
- Fixed a bug (#658) - :doc:`Routing <general/routing>` wildcard **:any** didn't work as advertised and matched multiple URI segments instead of all characters within a single segment.
- Fixed a bug (#1938) - :doc:`Email <libraries/email>` where the email library removed multiple spaces inside a pre-formatted plain text message.

Version 2.1.3
=============
Expand Down

0 comments on commit 936a8fe

Please sign in to comment.