Expand my Community achievements bar.

Dive in, experiment, and see how our AI Assistant Content Accelerator can transform your workflows with personalized, efficient content solutions through our newly designed playground experience.
SOLVED

String to html

Avatar

Level 2

I am assigning text to a variable and including basic HTML in it like, br-tag  and some CSS.
But, when the test displays in my email it does not process the HTML or CSS, for example,

 

 

 

 

{% let myCopy = "Lorem ipsum sit amet,<br />consectetur adipiscing elit, sed do <span style="color:red">eiusmod</span> tempor incididunt ut magna aliqua" %}

 

 

The output is,

 

 "Lorem ipsum sit amet,<br />consectetur adipiscing elit, sed do <span style="color:red">eiusmod</span> tempor incididunt ut magna aliqua" 

 

 
Not, 
"Lorem ipsum sit amet,
consectetur adipiscing elit, sed do eiusmod"

I would normally use something like this, to get the proper output,
stringToHTML
1 Accepted Solution

Avatar

Correct answer by
Level 2

Never mind, I got it. You need to use triple curly braces if you want to output html. 

 

{{{html}}}.

View solution in original post

1 Reply

Avatar

Correct answer by
Level 2

Never mind, I got it. You need to use triple curly braces if you want to output html. 

 

{{{html}}}.