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-escape email header content #119

Closed seifferth closed 4 years ago

seifferth commented 4 years ago

Adding plain email headers into html may cause problems. Consider the following header:

To: Frank Seifferth <frankseifferth@posteo.net>

If its content isn't escaped properly, the actual email address will be interpreted as an unknown tag by wkhtmltopdf and will thus be skipped. This fix causes the above example to be rendered correctly.

andrewferrier commented 4 years ago

Yes, good catch, and this seems logical and not harmful. Merging. Thanks again.