Automation Send Email Formatting (.text vs .html)

Tom Scoggin
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 5, 2023

<strong><li>Description:</strong> {{description.text}}</li> 

This string converts my formatted text to plane text without any issuesAs text.png

<strong><li>Description:</strong> {{description.html}}</li>

This string puts the formatted text in the email but adds a space above the description.html. Any ideas how to keep this from happening?

As html.png

1 answer

1 accepted

1 vote
Answer accepted
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 8, 2023

Hi @Tom Scoggin 

If you write that expression to the audit log, you will find that the rule's html encoding is adding a paragraph around the description.  And so the email (or a browser) display is interpreting the results it is adding space before the paragraph.

One work-around could be to use remove() to strip off the paragraph and prefix the description with a break, perhaps like this:

<strong><li>Description:</strong> <br>{{description.html.remove("<p>").remove("</p>")}}</li>

That could work for the scenario you show.  If there was other embedded markup this might break that.

Kind regards,
Bill

Tom Scoggin
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 10, 2023

Good morning @[deleted]

This worked perfectly. I just needed to get rid of the <br> because I actually didn't want a brake in the line of text. 

Thank you.

Like # people like this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events