Method: Mail::Encodings::QuotedPrintable.decode
- Defined in:
- lib/mail/encodings/quoted_printable.rb
.decode(str) ⇒ Object
Decode the string from Quoted-Printable. Cope with hard line breaks that were incorrectly encoded as hex instead of literal CRLF.
18 19 20 |
# File 'lib/mail/encodings/quoted_printable.rb', line 18 def self.decode(str) ::Mail::Utilities.to_lf ::Mail::Utilities.to_crlf(str).gsub(/(?:=0D=0A|=0D|=0A)\r\n/, "\r\n").unpack("M*").first end |