misc: remove pre-line style for email lines with action buttons (#84806) #940

Merged
fpeters merged 1 commits from wip/84806-emails-no-pre-line-for-buttons into main 2023-12-18 17:05:43 +01:00
1 changed files with 3 additions and 0 deletions

View File

@ -226,6 +226,9 @@ def email(
)[0]
# change paragraphs so manual newlines are considered.
htmlmail = force_str(htmlmail).replace('<p>', '<p style="white-space: pre-line;">')
htmlmail = force_str(htmlmail).replace(
'<p style="white-space: pre-line;">---===BUTTON', '<p>---===BUTTON'
)
# change titles to have a more appropriate line height
htmlmail = force_str(htmlmail).replace('<h2>', '<h2 style="line-height: 150%;">')
htmlmail = force_str(htmlmail).replace('<h3>', '<h3 style="line-height: 150%;">')