From: Michael Orlitzky Date: Sat, 30 Nov 2024 02:00:28 +0000 (-0500) Subject: mailcap-epiphany: fix   entity display issue X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=f8384f67c2c25eac418780c164c2307585678f03;p=mutt.git mailcap-epiphany: fix   entity display issue --- 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;