AquaMail Forum

English - Android => Bug reports => Topic started by: ewxrjk on December 25, 2018, 09:18:09 pm

Title: Incorrect parse of CDATA when rendering HTML email
Post by: ewxrjk on December 25, 2018, 09:18:09 pm
Initially analysed here: github.com/ewxrjk/rsbackup/issues/52


The result is that if a stylesheet contains "/>", for instance in a comment, AquaMail misrenders it.
Title: Re: Incorrect parse of CDATA when rendering HTML email
Post by: Nigelmay on December 26, 2018, 01:20:38 pm
I have the same issue, but only from a couple of correspondents, so I assume it's something to do with the way their HTML mails are constructed. It's clearly an AM issue, the same mails render perfectly in K-9.
Title: Re: Incorrect parse of CDATA when rendering HTML email
Post by: Kostya Vasilyev on January 08, 2019, 12:49:33 pm
There are cases of malformed messages where we have to close out a style when there is a "nested" opening tag:

<style>
.....
....
<div>
text starts here - the style tag is assumed closed at this point
</div>
</html>

Happens when people copy / paste html snippets into their newsletters (and not paying attention) or even with automated template / snippet generators.

As you can see, in these cases the <style> may not even close out ever. And without this special case, we were getting "help help, message text does not show in your app".

---

I'm willing to try and adjust our code for your nested comments case (we already handle those, but there is room for improvement it seems).

Please send a sample .eml to support / at / aqua-mail / dot com.