Formatting HTML content for colour-terminals (was: Rendering HTML as Markdown in mutt)

martin f krafft madduck at madduck.net
Fri Nov 1 04:37:41 UTC 2019


Regarding the following, written by "Kevin J. McCarthy" on 2019-11-01 at 10:12 Uhr +0800:
>$allow_ansi can enable this, but I recommend reading the option 
>description and thinking very carefully before doing this.

Great, I can confirm this works. So then the challenge becomes to 
filter out ANSI sequences from the `text/html` part *before* feeding 
it to the autoviewer, including HTML-encoded ANSI sequences, so that 
what the autoviewer prints *can* be interpreted as ANSI without 
fearing whatever malicious codes an attacker may choose to send.

Regarding the problem that the [--- BEGIN PGP ---] badge can get 
spoofed that way, I have often wondered if there wasn't a better way 
to make this information accessible, i.e. a status line indicator, 
combined with a new menu (similar to attachments), which I can 
invoke to inspect the actual verification of any signature etc.. 
This then becomes similar to how it's done in the browser. But 
that's a whole different beast…

Anyway, Akkana, there you have it: find a HTML dumper that can 
translate HTML to ANSI, and you've got it all, minus the security 
implications of allowing people to send you email that indirectly 
controls your terminal beyond just displaying characters.

-- 
@martinkrafft | https://riot.im/app/#/room/#madduck:madduck.net
  
an egg has the shortest sex-life of all: if gets laid once; it gets
eaten once. it also has to come in a box with 11 others, and the
only person who will sit on its face is its mother.
  
spamtraps: madduck.bogus at madduck.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mutt.org/pipermail/mutt-users/attachments/20191101/1961ccc6/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: digital_signature_gpg.asc
Type: application/pgp-signature
Size: 1118 bytes
Desc: Digital GPG signature (see http://martin-krafft.net/gpg/sig-policy/999bbcc4/current)
URL: <http://lists.mutt.org/pipermail/mutt-users/attachments/20191101/1961ccc6/attachment.asc>


More information about the Mutt-users mailing list