SOLVED

Re: Adding Code Script into an email - Validation error Email Message has script tags

Go to solution
Anonymous
Not applicable

Adding Code Script into an email - Validation error Email Message has script tags

Hi all,

I am trying to send out an email containing a piece of code to customers. I want it to look like this: <script src="{{my.Snippet:default=edit me}}"> </script>

I have created the "<" to be "&lt;" in HTML, however it is still doesn't allow me to validate the email.

It says that the Email Message has script tags.

Can someone advise?

thanks
Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

Re: Adding Code Script into an email - Validation error Email Message has script tags

I was successfully able to do this using this: <code>&lt;script src="//{{lead.Snippet Code:default=edit me}}"&gt;&lt;/script&gt;</code> !

View solution in original post

14 REPLIES 14
Josh_Hill13
Level 10 - Champion Alumni

Re: Adding Code Script into an email - Validation error Email Message has script tags

You are not allowed to put scripts into emails. No email program will permit this.

You should send the lead to a landing page instead.
Anonymous
Not applicable

Re: Adding Code Script into an email - Validation error Email Message has script tags

There is no email program that will allow this? Support notified me that if I use ASCII art in the email it should work. Why are you not allowed to use this?

Thank you!
Anonymous
Not applicable

Re: Adding Code Script into an email - Validation error Email Message has script tags

I was successfully able to do this using this: <code>&lt;script src="//{{lead.Snippet Code:default=edit me}}"&gt;&lt;/script&gt;</code> !

Ulyana_Avetisov
Level 2

Re: Adding Code Script into an email - Validation error Email Message has script tags

Hey Allison,

You created a snippet with the body of the script?

I tried putting the original script in <code> like your above example but MKTO wouldn't approve the email.

SanfordWhiteman
Level 10 - Community Moderator

Re: Adding Code Script into an email - Validation error Email Message has script tags

Did you HTML-encode the < and >?

Ulyana_Avetisov
Level 2

Re: Adding Code Script into an email - Validation error Email Message has script tags

Yep. The script also has this: ![CDATA[ // ]]

Would that have anything to do with it?

SanfordWhiteman
Level 10 - Community Moderator

Re: Adding Code Script into an email - Validation error Email Message has script tags

Yes, take it out.  That has no reason to be in the email (and it's questionable whether it should be in the runnable code).

Ulyana_Avetisov
Level 2

Re: Adding Code Script into an email - Validation error Email Message has script tags

Ok, thanks.

Aside from CDATA though, putting the script in <code> brackets disconnected the form so the body email displays the text of the script instead of the form. Without the <code>, the form was showing up.

SanfordWhiteman
Level 10 - Community Moderator

Re: Adding Code Script into an email - Validation error Email Message has script tags

The form?  I don't understand what this has to do with a form.  What are you actually trying to display to the user in this email?