For the complete documentation index, see llms.txt. This page is also available as Markdown.

Handle Escaped Characters in RENDER Statements

When using merge fields inside a render, if the merge field pulls in either < or >, the render will not properly work. This is because when the merge field pulls in < and > it pulls in the escaped version of these characters (&lt; &gt;). As of right now, we have a couple ways to work around this if it is needed.

Workarounds

We currently have two workarounds that are confirmed to work.

1

Use replaceAll in the merge field

Use a replace all in the merge field replacing the escaped characters with nothing and updating the matching statement in the render to not include < or >.

Example:

Example 1
<!--RENDER='{{!Opportunity.nextstep replaceAll="&lt;, ,&gt;, "}}' != 'a href="/" target="_blank" /a'-->{{!Opportunity.nextstep}}<!--ENDRENDER-->
2

Use a named query to pull the data ahead of time

Use a named query to pull the data ahead of time and use the results from the named query in the render. This will avoid the characters getting escaped.

Example:

Example 2
<!--{{!<LineItemsSOQL>
<class>none</class>
<queryname>myQuery1</queryname>
<soql>
SELECT count(id) cid
FROM opportunity
where id = '{{!opportunity.id}}' and New_Line_Test__c = 'Test: <'
</soql>
</LineItemsSOQL>}}-->{{!myQuery1.cid}}<br />
<br />
Render Text if: <!--RENDER= {{!myQuery1.cid}} > 0 -->RENDER TEXT HERE <!--ENDRENDER-->

Last updated

Was this helpful?