aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/lib
diff options
context:
space:
mode:
authorJamis Buck <jamis@37signals.com>2006-09-09 20:16:42 +0000
committerJamis Buck <jamis@37signals.com>2006-09-09 20:16:42 +0000
commit3e7aa0391fb0da5ea6c38ceb682c8634d3a1cb72 (patch)
tree5e34389821d5d367baaca4dee4124fd6940864a2 /actionmailer/lib
parent0a84624bd78643f2161d162f68669de03fe2bac8 (diff)
downloadrails-3e7aa0391fb0da5ea6c38ceb682c8634d3a1cb72.tar.gz
rails-3e7aa0391fb0da5ea6c38ceb682c8634d3a1cb72.tar.bz2
rails-3e7aa0391fb0da5ea6c38ceb682c8634d3a1cb72.zip
Make sure DOS newlines in quoted-printable text are normalized to unix newlines before unquoting. closes $166 and #4452
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5079 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionmailer/lib')
-rw-r--r--actionmailer/lib/action_mailer/vendor/tmail/quoting.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/actionmailer/lib/action_mailer/vendor/tmail/quoting.rb b/actionmailer/lib/action_mailer/vendor/tmail/quoting.rb
index c73157fe61..8fbb6e55de 100644
--- a/actionmailer/lib/action_mailer/vendor/tmail/quoting.rb
+++ b/actionmailer/lib/action_mailer/vendor/tmail/quoting.rb
@@ -68,6 +68,7 @@ module TMail
def unquote_quoted_printable_and_convert_to(text, to, from, preserve_underscores=false)
text = text.gsub(/_/, " ") unless preserve_underscores
+ text = text.gsub(/\r\n|\r/, "\n") # normalize newlines
convert_to(text.unpack("M*").first, to, from)
end