Mutt: Fix encoding when viewing HTML in browser

master
Pierre Neidhardt 2015-10-19 19:17:51 +02:00
parent a4b35b32bc
commit 7faee04d55
2 changed files with 9 additions and 1 deletions

View File

@ -145,7 +145,7 @@ bind editor <Tab> complete-query
bind generic,alias,attach,browser,editor,index,compose,pager,pgp,postpone ':' noop
## HTML mail view with graphical Internet browser.
macro attach 'V' "<pipe-entry>cat >~/.cache/mutt/mutt-attach.mail && $BROWSER ~/.cache/mutt/mutt-attach.mail && rm ~/.cache/mutt/mutt-attach.mail<enter>"
macro attach 'V' "<pipe-entry>~/.mutt/view-html.sh<enter>"
## Remap bounce-message function to "B"
bind index B bounce-message

8
.mutt/view-html.sh Executable file
View File

@ -0,0 +1,8 @@
#!/bin/sh
file="${0%/*}/mail.html"
## Assume utf-8, otherwise most browsers will display ascii.
echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>' > "$file"
cat >> "$file"
$BROWSER "$file"
rm "$file"