DockYard / elixir-mail

Build composable mail messages
392 stars 64 forks source link

Fix 8-bit decoding to preserve line breaks but restore wrapped lines #166

Closed andrewtimberlake closed 1 month ago

andrewtimberlake commented 1 month ago

The current implementation of 8-bit encoding wraps lines longer than 998, as it should, but then removes all line breaks on decoding—but it should only remove those added due to line wrapping. This pull request also validates the character set by raising on a null character in the same way the encoding does. Because of the change in decoding, this is a breaking change (But we haven’t released the version increase from the 7-bit decoding fix #164 so there’s no need for a further version increase.)