mikel/mail — pull request #493 by jeremy (2013-01-14 21:32:51+00:00)
Title: Decode quoted-printable with bad line breaks

Many many clients hex-encode the \r, \n, or \r\n line break when they're
supposed to use a literal CRLF (quoted-printable had the idea that
they'd be line break agnostic). To make matters worse, they also include
the CRLF after the encoded line break, so decoding it results in a
double line break. If anything, they should use a soft line break.

"=0D\r\n" should decode as "\r\n" not "\r\r\n"
"=0A\r\n" should decode as "\r\n" not "\n\r\n"
"=0A=0D\r\n" should decode as "\r\n" not "\r\n\r\n"

Clients using hex-encoded line breaks along with quoted-printable soft
line breaks still work as expected.