readthedocs.org
readthedocs.org copied to clipboard
Email: `<foo>` words are stripped from the text version
When sending emails, we send both, HTML and text versions. For the text version, we use this template, with a striptags
filter.
https://github.com/readthedocs/readthedocs.org/blob/3fee5e84d03cd1794dcfbd78b8f8585adbd4d6f9/readthedocs/templates/core/email/common.txt#L3-L3
We probably are using that as a fallback for emails that don't have a text only version.
This isn't a problem most of the time, but we recently started sending emails using Markdown for the text version, in Markdown we can include links using the <https://example.com>
syntax, that is recognized as a tag and being deleted.
To fix this, we have a couple of options:
- Avoid using the
<link>
syntax. This is probably hard to avoid. - Don't use the
striptags
filter, always make sure to have a text form of each email. - Stop including the text version of the email.