On 1/31/25 21:44, Stephen J. Turnbull wrote:
I don't think that's the best we can do, though. Especially if Convert HTML to plain is also yes, we want to preserve the HTML part and convert it, don't we?
Not if we're collapsing alternatives. If we're collapsing a multipart/alternative part with text/plain and text/html alternatives to just the first alternative we don't keep the text/html part.
The only html parts we keep and possibly convert to plain text are ones that aren't a second or later alternative in a multipart/alternative part.
I think a better (or additional) strategy would be to check the selected alternative for blank, and if so, drop it and try again for an appropriate type.
The collapsing of a two part multipart message with an empty first part into a single part message with just the second part is the last thing that's done after all other content filtering.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan