fix: strip html from preheader for templates where html is allowed #103
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary | Résumé
For services with
![Screen Shot 2021-08-27 at 10 49 15 AM](https://user-images.githubusercontent.com/5498428/131146365-c6e6919f-b28f-49ec-b327-f3c6499e4ffc.png)
allow_html
set to true, if html is entered into the email body, it can be included in the email preheader if it occurs near the start of the email. The email preheader is used to populate the email preview that recipients see on some email clients before opening the email:If the email is allowed to contain html, we should strip it from the preheader. I have added that logic and now the preheader is as expected:
![Screen Shot 2021-08-27 at 10 48 48 AM](https://user-images.githubusercontent.com/5498428/131146247-16f6fbbb-84df-4f90-a190-d72235faad58.png)