
How about a feature to include "HTML" in the current Hyperkitty choices of (Text or Markdown) rendering?
A sanitizer must be used to prevent malicious attacks. https://github.com/messense/nh3 . lxml is another package that processes html.
A sanitizer would be helpful for more aspects. Permit a limited set of markdown so that messages still appear professional. Gitlab/Github don't allow arbitrary fonts or font sizes, right? Mostly remove these tags.
A way that code blocks could be presented: determine an established list of known codeblock styles. Configure the sanitizer to permit this range of fonts or styling elements. By allowing them through the filter, a code styling is rendered. (It is permitted/allowed to be rendered.) Even better, when the sanitizer recognizes the fonts, it replaces them with an "official" set of codeblock fonts.
Otherwise, if other font tags are entirely removed, if they are missing, the email client or web ui will decide the font selection, and it will appear "standard".
In order for both email clients and Hyperkitty to view the same result, the sanitizer should ideally be applied to outgoing emails as well as rendering in the UI. That means this feature would affect more than just Hyperkitty. (i.e. mailman-core). Although, that could be implemented as a separate step, until which time emails would get a full range of HTML, without sanitizing.
In this scheme, ensure outgoing emails are multi-part MIME with plain text and html versions.
Some of our users are really in favor of more formatting.
Others prefer plain text.
Those who prefer plain text have various arguments that HTML messages will be rendered badly, and won't be legible.
Questions:
- Would "multi-part MIME with plain text and html versions both" solve the problem for users who prefer plain text?
- What percentage of email clients that support HTML formatting when sending will also include a plain text rendering of the same content in the outgoing message?
- Is it usually the responsibility of a receiving mail client to be able to convert HTML to plain text if the user requests it?
- When mailman-core receives and then sends out a message, can it receive HTML, generate a plain-text version, and then send both?
Thoughts?