Expand my Community achievements bar.

Never miss an update of the Adobe Journey Optimizer Community Lens! Subscribe now to get the latest updates, insights, and highlights delivered straight to your inbox every time a new edition drops.
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}}}.