Page MenuHome GnuPG

GpgOL: Improve handling of HTML Only mails
Open, NormalPublic

Description

We have at least two reports that GpgOL will show OpenPGP encrypted mails which are of type text/html as empty when the outlook setting to only view mails as plain text is set. As we genrally recommend using plain text mails only we should try to support this option better.

This means both checking why they might be displayed empty, and additionally to filter out HTML tags / CSS when displaying the mail. As the current code would show the HTML code in the Messageviewer when plain text is set and we do not have a text/plain MIME part.

Event Timeline

aheinecke created this task.
werner mentioned this in Unknown Object (Phriction Wiki Document).Sep 26 2024, 3:36 PM

I mostly receive HTML only mails from automated mail systems.

To help clarify what I mean. If GpgOL decrypts a mail which is not multipart/alternative but has only a text/html part. But if the Outlook setting "always show mails as text" is active. It will show foo<br/><ul><li><pre>foobar</pre></li></ul> etc.
While Outlook itself does something like QTextDocument::toPlainText in that it would convert above example to:

foo
 - foobar

And my thought when I created this ticket was that we could at least have a regular expression to remove the html tags after some basic replacements like replacing <br/> with a linebreak.