msgviewer: decode headers prior to displaying them
This commit is contained in:
parent
cb168682b3
commit
126119c0b1
1 changed files with 7 additions and 1 deletions
|
@ -590,8 +590,14 @@ func (pv *PartViewer) attemptCopy() {
|
|||
// hence all writes in this block go directly to the pager
|
||||
fields := pv.msg.RFC822Headers.Fields()
|
||||
for fields.Next() {
|
||||
var value string
|
||||
var err error
|
||||
if value, err = fields.Text(); err != nil {
|
||||
// better than nothing, use the non decoded version
|
||||
value = fields.Value()
|
||||
}
|
||||
field := fmt.Sprintf(
|
||||
"%s: %s\n", fields.Key(), fields.Value())
|
||||
"%s: %s\n", fields.Key(), value)
|
||||
pv.pagerin.Write([]byte(field))
|
||||
}
|
||||
// virtual header
|
||||
|
|
Loading…
Reference in a new issue