0

I'm looking to render html by passing a string to Responsys.

DynamicVariable.TEXT would be a string that looks like:

<button style="background-color: red; color: white; padding: 25px; border-radius: 4px; border: none; font-size: 18px; font-weight: bold">
  Click Here
</button>

I've tried using ?html

<body bgcolor="white" style="margin: 0px; padding: 0px;">
  ${DynamicVariable.TEXT?html}
</body>

Also tried <#escape x as x?html>:

<body bgcolor="white" style="margin: 0px; padding: 0px;">
  <#escape x as x?html>
    <#noescape>${DynamicVariable.TEXT}</#noescape>
  </#escape>
</body>

As well as <#noescape>

<body bgcolor="white" style="margin: 0px; padding: 0px;">
  <#noescape>${DynamicVariable.TEXT}</#noescape>
</body>

but none of these work. Any help would be greatly appreciated!

4

1 回答 1

1

I found the answer.

Using <#noescape> is correct. However, the code was not rendering because you need to leverage a document that is saved in the Content Library within Responsys.

<body bgcolor="white" style="margin: 0px; padding: 0px;">
  <#noescape>${DynamicVariable.TEXT}</#noescape>
</body>
于 2020-08-27T13:45:37.867 回答