Question
HTML anchor tag inside Liquid {% let %} variable results in "welcomeText of email variant is malformed" Product
Issue Summary
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 welcomeText variable contains HTML tags such as <br>, <sup>, <b>, or <p>, the email validates successfully.
However, when the variable contains an HTML anchor tag (<a href="...">...</a>), the email validation fails with the following error:
welcomeText of email variant is malformed
Steps to Reproduce
- Define a variable in the email template:
{% let welcomeText = "<a href='https://google.com'>Google</a>" %}- Render the variable in the email template or a content fragment using:
{{{welcomeText}}}- Save or validate the email.
Actual Result
The email validation fails with the following error:
welcomeText of email variant is malformed