We’ve run into this annoying bug a number of times on discourse.mozilla.org, where users will send an email to Discourse and half of the email will go missing for no apparent reason.
The reason is, as it turns out, because whatever email client they’re using has generated html along the lines of this:
<b>Some bold text<br></b>.
lib/email/reciever.rb this html is then turned into this markdown by
**Some bold text **
EmailReplyTrimmer comes along, sees
** as a delimiter between body and footer of email, and removes it and everything below it.
I would say the bug here exists in
HtmlToMarkdown since the markdown it’s generating isn’t valid:
So I’ve had a crack at fixing that here:
@zogstrip this is your area of expertise, right?