andrewferrier / email2pdf

Script to convert emails to PDF from the command-line, as well as detach recognized attachments. Helps to process incoming emails and assist automatically with a non-paper paperwork workflow. Designed to work in tandem with getmail to convert forwarded emails to PDF automatically.
MIT License
68 stars 35 forks source link

HTML specific characters will not be displayed in plain/text emails #93

Closed gpgmailencrypt closed 9 years ago

gpgmailencrypt commented 9 years ago

Hi, if a plain text email contains e.g. a '<' character, this will be not displayed in the resulting pdf. Reason is, that it will be handled as the starting point of a tag and thus not be printed as a normal character. There are also some other characters having this problem. I recommend using html.escape() function in your handle_message_body function

Horst

andrewferrier commented 9 years ago

Great spot, thanks. I think I've fixed this now (as well as adding some unit tests to validate that).