Open jkavery opened 5 years ago
Can you provide the source of a message that is a reply from AOL Android?
It's probably a bug in HtmlQuoteCreator
. That class is using some crude regular expressions trying to find a point in the original HTML where the app can insert the reply text. We should probably throw this code away and reimplement the functionality using Jsoup to parse the HTML and find the correct place to insert text.
I was hoping for the second message. The one that was replied to using K-9 Mail. Not the third message, the one generated by K-9 Mail.
Thanks :+1:
It looks like the AOL Android app just put the reply text in front of the original HTML so that we end up with something like this:
<p>[reply text]</p>
<div>[quote header]</div>
<!-- HTML from original message -->
<html>
[original message]
</html>
This is not exactly clean HTML and is what confuses K-9 Mail's insertion algorithm. There's probably no way to work around this without using a proper HTML parser as suggested in https://github.com/k9mail/k-9/issues/4237#issuecomment-706751106
When replying to an email sent by AOL Android that is itself a reply, the text of the reply I type, followed by the prefix or header (depending on the "Reply quoting style" setting) are not placed before the quoted AOL message. Instead, they are inserted inside the quoted AOL message after its first reply header.
Expected behavior
Text of reply, followed by the prefix/header created by K9, precede the entire quoted message.
Actual behavior
Text of reply, followed by the prefix/header created by K9, are inserted into the quoted message after the first reply header it contains.
Steps to reproduce
The following (a decoding of the quoted-printable content sent by K9) shows the result of this test:
Environment
K-9 Mail version: 5.600
Android version: 8.0.0
Account type (IMAP, POP3, WebDAV/Exchange): IMAP
Example AOL mailers: