HTML being rendered as text in email message
I am using the #each iterator to loop through an array. When using the following code, the A HREF html portion get renderesd as text in the email, not as HTML. How would I need to change the following template snipped:
{{#each domains}}
<a href="https://dailydomains.io/app?domain={{domain}}">{{domain}}</a><br/>
{{/each}}
Thanks in advance.
Kai
7 Replies
Hi @.mrjoojoo
Please try this above code in
custom code
tab
Remove {{{ }}} around <a>
tagPawan, same issue. I resorted to creating the a href payload server side and pass it in as an array of obejcts with the fully formed a href string. Not ideal but I get the n+1 issue here. Would be awesome to do that all in the template.
Hi Kai
Could you share more information on how the above approach is failing?
maybe with example payload?
@Pawan Jain I am having the same issue here too
@Zac Clifton
1. sending link value from payload
1. sending link value from payload
<a href={{link}}> Click on this link </a>
2. or using hard coded href value
<a href="https://docs.novu.co/getting-started/commercial-open-source"> Click on this link </a>
Both options are working for me 😅
We are closing this post due to inactivity.
Feel free to create a new post if you have any questions or you are still facing issue