aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-04-07 06:30:59 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-04-07 06:30:59 +0000
commitaffe7c0f679e8f11724c249b594dc51724068af2 (patch)
tree763a05a3cd00e502d2f10da793142ab4fdc2435e /actionmailer
parent7b37c779d805081aedb635a8bc801aa4a4339cc2 (diff)
downloadrails-affe7c0f679e8f11724c249b594dc51724068af2.tar.gz
rails-affe7c0f679e8f11724c249b594dc51724068af2.tar.bz2
rails-affe7c0f679e8f11724c249b594dc51724068af2.zip
Fixed unquoting of emails that doesn't have an explicit charset #1036 [wolfgang@stufenlos.net]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1105 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionmailer')
-rw-r--r--actionmailer/CHANGELOG5
-rw-r--r--actionmailer/lib/action_mailer/vendor/tmail/quoting.rb5
2 files changed, 8 insertions, 2 deletions
diff --git a/actionmailer/CHANGELOG b/actionmailer/CHANGELOG
index 722311d4d0..d7c2653df1 100644
--- a/actionmailer/CHANGELOG
+++ b/actionmailer/CHANGELOG
@@ -1,3 +1,8 @@
+*SVN*
+
+* Fixed unquoting of emails that doesn't have an explicit charset #1036 [wolfgang@stufenlos.net]
+
+
*0.8.1* (27th March, 2005)
* Fixed that if charset was found that the end of a mime part declaration TMail would throw an error #919 [lon@speedymac.com]
diff --git a/actionmailer/lib/action_mailer/vendor/tmail/quoting.rb b/actionmailer/lib/action_mailer/vendor/tmail/quoting.rb
index 626e88238f..1ff00d9299 100644
--- a/actionmailer/lib/action_mailer/vendor/tmail/quoting.rb
+++ b/actionmailer/lib/action_mailer/vendor/tmail/quoting.rb
@@ -9,7 +9,8 @@ begin
end
def unquoted_body(to_charset = 'utf-8')
- Unquoter.unquote_and_convert_to(quoted_body, to_charset, header["content-type"]["charset"])
+ from_charset = header['content-type']['charset'] rescue 'us-ascii'
+ Unquoter.unquote_and_convert_to(quoted_body, to_charset, from_charset)
end
def body(to_charset = 'utf-8', &block)
@@ -97,4 +98,4 @@ rescue LoadError => e
end
end
end
-end \ No newline at end of file
+end