c8a428d fix(host): Fix crashes when EML has invalid UTF-8
While input from Thunderbird is always sanitised, users can add random
things into the temporary EML file. And when there are invalid UTF-8
sequences in the file, read_line() fails as it cannot convert it to
String.
Since Thunderbird sanitises outgoing emails as well, we don't need to
bother sending the very original contents to Thunderbird. Simply
from_utf8_lossy() should suffice.
Checklist
[x] I have rebased my branch so that it has no conflicts
Description
c8a428d
fix(host): Fix crashes when EML has invalid UTF-8While input from Thunderbird is always sanitised, users can add random things into the temporary EML file. And when there are invalid UTF-8 sequences in the file, read_line() fails as it cannot convert it to String.
Since Thunderbird sanitises outgoing emails as well, we don't need to bother sending the very original contents to Thunderbird. Simply from_utf8_lossy() should suffice.
Checklist
Is this a breaking change?
No.
Test results
Fixes #65