Expand my Community achievements bar.

Join us for the Adobe Journey Optimizer Community Q&A Coffee Break on 1st October at 8 am PT with Journey Optimizer experts Amarnath Vannarath, Ariel Sultan, Arthur Lacroix and Sandra Hausmann.
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}}}.