diff options
author | Jamis Buck <jamis@37signals.com> | 2005-07-06 09:53:34 +0000 |
---|---|---|
committer | Jamis Buck <jamis@37signals.com> | 2005-07-06 09:53:34 +0000 |
commit | bde3df2bec99103eeb91c4caaf0483aacadccd92 (patch) | |
tree | ca066ea3db87908f122675b3481a3f5c25ee2665 /actionmailer/lib/action_mailer/utils.rb | |
parent | 853ea556749809658c0a5c0c8b61263ec022fba1 (diff) | |
download | rails-bde3df2bec99103eeb91c4caaf0483aacadccd92.tar.gz rails-bde3df2bec99103eeb91c4caaf0483aacadccd92.tar.bz2 rails-bde3df2bec99103eeb91c4caaf0483aacadccd92.zip |
Correctly normalize newlines in outgoing emails before encoding the body [John Long]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1732 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionmailer/lib/action_mailer/utils.rb')
-rw-r--r-- | actionmailer/lib/action_mailer/utils.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/actionmailer/lib/action_mailer/utils.rb b/actionmailer/lib/action_mailer/utils.rb new file mode 100644 index 0000000000..552f695a92 --- /dev/null +++ b/actionmailer/lib/action_mailer/utils.rb @@ -0,0 +1,8 @@ +module ActionMailer + module Utils #:nodoc: + def normalize_new_lines(text) + text.to_s.gsub(/\r\n?/, "\n") + end + module_function :normalize_new_lines + end +end |