Alir3z4 / html2text

Convert HTML to Markdown-formatted text.
alir3z4.github.io/html2text/
GNU General Public License v3.0
1.81k stars 272 forks source link

Add ignore_mailto_links config option #356

Closed gpanders closed 3 years ago

gpanders commented 3 years ago

This is useful when converting HTML emails to text. Generally, there's no reason to preserve these links when sending email.

coveralls commented 3 years ago

Coverage Status

Coverage increased (+0.01%) to 97.075% when pulling 936e8eb19ed56de270c4e5fb32a28840330f9e6d on gpanders:ignore-mailto-links into e3ea63ca5223d20dd90fc76987a064ad41b61352 on Alir3z4:master.

coveralls commented 3 years ago

Coverage Status

Coverage increased (+0.01%) to 96.824% when pulling 28945e608e7260805b4c6504ac4e020542a4d575 on gpanders:ignore-mailto-links into 4592133f82dfea65491321c28dc0f080fc786f49 on Alir3z4:master.

Alir3z4 commented 3 years ago

I checked by sending plain/text email and opened the same email in Gmail and Thunderbird and also Windows Mail. Even though the email was plain text, they would make it clickable by doing mailto:xxx

Considering the above, would there be still a reason to remove them before sending?

gpanders commented 3 years ago

Considering the above, would there be still a reason to remove them before sending?

I use html2text in my mail client to convert HTML emails into plain text so that I can then respond to them in plain text. There is no reason to linkify email addresses in a plain text email. Consider:

Please email me at [greg@example.com](mailto:greg@example.com).

So the ability to strip these out is useful for those of us who send and receive emails in plain text.

Alir3z4 commented 3 years ago

Yeah, makes sense. Let me fix the conflict and get it merged.