Skip to content

Commit 0a70f7f

Browse files
authored
🐛 Fixed repeating text in plaintext version of emails (#17162)
fixes https://github.com/TryGhost/Team/issues/3541 The email preheader, which is only present in the html version of an email, is also included in the plaintext version of all emails. This results in all text being duplicated twice in plaintext emails.
1 parent 087e580 commit 0a70f7f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/html-to-plaintext/lib/html-to-plaintext.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ const loadConverters = () => {
6060
const emailSettings = mergeSettings({
6161
selectors: [
6262
// equiv hideLinkHrefIfSameAsText: true
63-
{selector: 'a', options: {hideLinkHrefIfSameAsText: true}}
63+
{selector: 'a', options: {hideLinkHrefIfSameAsText: true}},
64+
// Don't include html .preheader in email
65+
{selector: '.preheader', format: 'skip'}
6466
]
6567
});
6668

0 commit comments

Comments
 (0)