aerc/filters/html-unsafe
Jens Grassel 1ecee8efa5 Add html "unsafe" filter to work also without dante
If socksify (from dante) is not installed then the filter uses w3m
without it to render an html message part.

Signed-off-by: Jens Grassel <jens@wegtam.com>
Acked-by: Robin Jarry <robin@jarry.cc>
2022-04-17 12:17:43 +02:00

17 lines
420 B
Bash
Executable file

#!/bin/sh
# aerc filter which runs w3m using socksify (from the dante package) to prevent
# any phoning home by rendered emails. If socksify is not installed then w3m is
# used without it.
if [ $(command -v socksify) ]; then
export SOCKS_SERVER="127.0.0.1:1"
PRE_CMD=socksify
else
PRE_CMD=""
fi
exec $PRE_CMD w3m \
-T text/html \
-cols $(tput cols) \
-dump \
-o display_image=false \
-o display_link_number=true