mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
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
This commit is contained in:
parent
8ff9e9365d
commit
c9aaad795d
1 changed files with 2 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue