diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2008-04-03 17:27:55 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2008-04-03 17:27:55 +0000 |
commit | c9aaad795dbeaa9133a14b0d40fb0683cad30a2f (patch) | |
tree | b421fb6e74d1402377eafc824b719bb56b9c44c0 /actionmailer/lib/action_mailer/quoting.rb | |
parent | 8ff9e9365da7ed6dbc2bf9862a9b314e7c819514 (diff) | |
download | rails-c9aaad795dbeaa9133a14b0d40fb0683cad30a2f.tar.gz rails-c9aaad795dbeaa9133a14b0d40fb0683cad30a2f.tar.bz2 rails-c9aaad795dbeaa9133a14b0d40fb0683cad30a2f.zip |
Ruby 1.9 compat: ascii encoding for quoted-printable regexps
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9217 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionmailer/lib/action_mailer/quoting.rb')
-rw-r--r-- | actionmailer/lib/action_mailer/quoting.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/actionmailer/lib/action_mailer/quoting.rb b/actionmailer/lib/action_mailer/quoting.rb index d6e04e4d83..b222432787 100644 --- a/actionmailer/lib/action_mailer/quoting.rb +++ b/actionmailer/lib/action_mailer/quoting.rb @@ -24,6 +24,8 @@ module ActionMailer # Quote the given text if it contains any "illegal" characters def quote_if_necessary(text, charset) + text = text.dup.force_encoding(Encoding::ASCII_8BIT) if text.respond_to?(:force_encoding) + (text =~ CHARS_NEEDING_QUOTING) ? quoted_printable(text, charset) : text |