AJO Email Template - anchor tag inside {% let %} variable causes "variable is malformed" validation error | Community
Skip to main content
Level 2
July 21, 2026
Question

AJO Email Template - anchor tag inside {% let %} variable causes "variable is malformed" validation error

  • July 21, 2026
  • 1 reply
  • 15 views

We are using a common footer fragment across multiple email templates. The footer receives a variable (welcomeText) from the email template and renders it using triple braces ({{{welcomeText}}}).

When the variable contains HTML tags such as <br>, <sup>, <b>, or <p>, the email validates successfully.

However, when the variable contains an HTML anchor (<a href="...">...</a>), the email validation fails with the error:

welcomeText of email variant is malformed

 

 

Steps to Reproduce

  1. Create a variable in an email template: {% let welcomeText = "<a href='https://google.com'>Google</a>" %}
  2. Render the variable in the email or fragment: {{{welcomeText}}}
  3. Validate or save the email.

 

Actual Result

The email validation fails with:

welcomeText of email variant is malformed

 

Expected Result

The variable should accept valid HTML anchor tags in the same way it accepts other supported HTML tags such as <br>, <sup>, <b>, and <p>, allowing the HTML to be rendered using triple braces ({{{ }}}).

 

Additional Information

  • The following HTML tags work correctly inside the same variable:
    • <br>
    • <sup>
    • <b>
    • <p>
  • Only the <a> tag causes the validation error.
  • We have tested multiple variations including:
    • Single quotes (')
    • Double quotes (")
    • Escaped quotes (\")
    • HTML entities (")
  • The issue persists regardless of the quote style used in the anchor tag.

Business Impact

We use a common footer fragment across multiple email templates. The legal disclaimer text differs per template, but some templates require dynamic hyperlinks (for example, triangle.com) within the disclaimer. Because anchor tags cannot be included in the variable, we are unable to maintain a reusable footer fragment without duplicating template-specific HTML.

1 reply

SatheeskannaK
Community Advisor
Community Advisor
July 22, 2026

@shivangisingh I believe this is also a duplicate of another thread you have.

Thanks, Sathees