From f8384f67c2c25eac418780c164c2307585678f03 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Fri, 29 Nov 2024 21:00:28 -0500 Subject: [PATCH] mailcap-epiphany: fix   entity display issue --- mailcap-epiphany | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/mailcap-epiphany b/mailcap-epiphany index e490a7e..b9cd9e9 100644 --- a/mailcap-epiphany +++ b/mailcap-epiphany @@ -1,9 +1,11 @@ -# We avoid using "nametemplate" because it uses a predictable filename -# under /tmp. The "needsterminal" forces mutt to wait until you press -# Return before it deletes the file; otherwise, Epiphany will notice -# that it's gone and show you nothing. Finally, the call to "tidy" -# ensures that Epiphany will not balk at the invalid HTML prevalent in -# emails. We ignore errors in "tidy" because we expect a bunch of HTML -# warnings to remain. The weird subshell construct is there because I -# don't know how to escape a semicolon. -text/html; (tidy -quiet -modify %s || true) && /usr/bin/epiphany %s; description=HTML Text; test=test -n "${DISPLAY}${WAYLAND_DISPLAY}"; needsterminal; +# 1. We avoid using "nametemplate" because it uses a predictable filename +# under /tmp. +# 2. The "needsterminal" forces mutt to wait until you press Return before +# it deletes the file; otherwise, Epiphany will notice that it's gone +# and show you nothing. +# 3. The call to "tidy" ensures that Epiphany will not balk at the invalid +# HTML prevalent in emails. We ignore errors in "tidy" because we expect +# a bunch of HTML warnings to remain. +# 4. We also have to strip   entities because Epiphany won't display +# them and basically every HTML email contains them. +text/html; (tidy -quiet -modify %s || true) && sed -i %s -e 's/ \;/ /g' && /usr/bin/epiphany %s; description=HTML Text; test=test -n "${DISPLAY}${WAYLAND_DISPLAY}"; needsterminal; -- 2.44.2