How to escape HTML in your Structured Data Snippet
Have you been exploring our Structured Data Snippet article, but are still running into problems with your email platform stripping out the Structured Data Snippet due to the <script> tag?
If so, one helpful tip is to escape the HTML tags in the <script> tag. Here is an example:
<!--
<script type="application/json+trustpilot">
{
"recipientEmail": "xxxx",
"recipientName": "xxxx",
"referenceId": "xxxx"
}
</script>
-->
With this approach you will be switching out the < and > signs for their HTML alternatives. We also recommend wrapping the whole snippet in HTML comment tags, which you can see at the top and bottom of the example, ie. <!-- and -->.
Many email platforms and editors will now ignore this version of the <script> tag and stop stripping it out of your trigger emails.
0 commentaire
Sort by