Pulling HTML blocks into an Eloqua email using a Custom Object field merge

Phil_Boyden Posts: 23 Red Ribbon


I have a potential use case where we are looking at pulling an HTML block into an email from a field on a CDO, using a field merge. Does anybody have any tips on a good way to achieve this?

Thanks in advance!


  • Sachin Jain-Oracle
    Sachin Jain-Oracle Mr Posts: 161 Employee

    Hi Phil

    Thank you for contacting the community forum with your questions and concerns.

    Here under the Dream It category, a few use cases with solutions are discussed https://community.oracle.com/topliners/discussion/4387986/functional-html-code-in-field-merges). As supplying raw HTML to field merge values is not secure. For security reasons, HTML encodes the contents of Field Merge to prevent XSRF attacks.

    A workaround could be that if you don't want to encode, you need to edit the content. Please open the Email or Landing page and find the lines where Field Merge is located. It would be best if you changed it like this:

    <span class="eloquaemail">YourFieldMergeName</span>

    Change to:

    <span class="eloquaemail" encodefor='none'>YourFieldMergeName</span>

    If you would like to continue the discussion here, please feel free to post your comment or feedback.

    If I answered your question, please click "yes" in the "Did this answer your question" section below.


    Sachin Jain

    Community Manager

    Stay Safe | Stay Healthy

    Thanks, and Best Regards

    Sachin Jain | CX Community Manager

  • Phil_Boyden
    Phil_Boyden Posts: 23 Red Ribbon

    Hi Sachin,

    Thanks for the response here. That workaround unfortunately still renders all tags into the email.

    We got close with a workaround using the <pre> tag (this was suggested previously at the bottom of the link you shared), but as that renders using the previous markup while also removing that markup, the links in the HTML were removed, so no longer clickable.

    Are there any other options you can think of? I started this new one, as the other thread looked to have gone dead a few years ago, so I wanted to check for anything fresh.

    Thanks in advance,


  • Richard Holder
    Richard Holder Posts: 8 Red Ribbon

    Hi @Phil_Boyden

    Could you share a bit more about your use case? Does your CO field contain both data and html for formatting?


  • Phil_Boyden
    Phil_Boyden Posts: 23 Red Ribbon

    Hi Richard,

    The field on the CO (in theory) will be holding pure HTML. It is to automate links to information when Salesforce spots the information has been updated as a CMS notifies the CRM. Each contact with a need to know of the update will have the relevant links for them added into a block of HTML held in a field on the CO so the content can be automatically pulled into an automated email through a merge (was the initial plan). Any given contact could have one to many links to be rendered.

    Using the <pre> tag worked to pull the content in and render correctly, with the exception the links <a> tag and href are removed, so not clickable.