diff options
Diffstat (limited to 'actionmailer')
-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 |