Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 9217

Show
Ignore:
Timestamp:
04/03/08 17:27:55 (4 months ago)
Author:
bitsweat
Message:

Ruby 1.9 compat: ascii encoding for quoted-printable regexps

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/actionmailer/lib/action_mailer/quoting.rb

    r2088 r9217  
    2525    # Quote the given text if it contains any "illegal" characters 
    2626    def quote_if_necessary(text, charset) 
     27      text = text.dup.force_encoding(Encoding::ASCII_8BIT) if text.respond_to?(:force_encoding) 
     28 
    2729      (text =~ CHARS_NEEDING_QUOTING) ? 
    2830        quoted_printable(text, charset) :