The discussion revolves around the Discourse site setting “incoming_email_prefer_html,” which has been enabled for a year to address line break issues in email replies. Recently, users noticed unwanted inline styles appearing in posts when this setting is active, despite the raw HTML appearing clean. zogstrip proposed removing the setting entirely and always converting HTML to Markdown using the new Html To Markdown converter, which could resolve many HTML-related issues. However, mcwumbly and others expressed concern about losing the ability to prefer HTML due to persistent line break problems in plain text. codinghorror emphasized preferring plain text unless forced to use HTML, and warned against risky pipeline changes late in a release. sam argued that removing the setting entirely doesn’t make sense since it’s already in use and helps transition to HTML preference; instead, it should be marked experimental or reverted. After debate, zogstrip restored the setting and enabled it on Meta to test the HTML-to-Markdown converter in practice. tophee suggested the converter might also improve identifying breakpoints for stripping quoted replies, noting that HTML often contains clearer structural cues than plain text. They also raised concerns about minimum character limits affecting short email replies like “yes.” The team appears to favor keeping the setting while refining the converter, rather than forcing a full switch to Markdown.
Now that we have a Html To Markdown converter, I was thinking of ditching that setting and always converting HTML to Markdown. This would fix a lot of issues with HTML.
Would you be on-board with this or do you need HTML?
The main reason we are using this is because of the funky line break issues referenced in the topic I linked to in the OP. Would prefer things as markdown if it works well enough.
Happy to PM you this email as an example to try that with if you’d like.
Update pretty pleased with the test results @zogstrip showed me.
The setting incoming_email_prefer_html has already existed for a year, this commit removes it.
I agree that this late in the game it probably does not make sense to switch everyone to the new converter, it is guaranteed to have edge cases, but stripping a “site setting” just cause we fixed the implementation of the “site setting” does not really make sense to me.
Instead if we feel this has too much risk just revert the commit for now. Or leave the setting and mark in (experimental)
We should decide on one or the other paths. As I recall there were technical problems using the HTML as the preferred source. We should either
resolve those problems and always prefer HTML
or
give up and always prefer plain text
I don’t like carrying around random secondary code paths hidden behind Booleans that we aren’t even testing, and we have no idea if they even work. Sextuply so for the wild world of email…
In a recent reply-by-email post where it completely failed to strip the previous post, I noticed that in the text part of email, the break point looked like this:
In any case, I had another reply-by-email post today that failed to be stripped of any of the replied-to post and when I wanted to do that manually, I couldn’t do it because the resulting post would have been under 20 characters. So it struck me whether the min character requirement might at some point affect the processing of incoming emails? In other words: if someone replies by emails saying just “yes”, how is that email going to be processed?