superphonic
superphonic

Reputation: 8074

Displaying a <script> tag in an email

OK this seems simple enough, but I can't think of a solution. SO to the rescue.

I am trying to add a <script></script> tag to an email, not for the purposes of running the script, but so the user can copy and paste it in their websites. So for example the email might say:

Simply copy the text below and paste it into you webpages where you would like widget to be displayed:

<script src="widget"></script>

The problem is the script text is not displayed in the email. How can I display it as simple text and not have the email client remove it?

Thanks

Upvotes: 1

Views: 3479

Answers (1)

mehdi
mehdi

Reputation: 1755

use &lt; and &gt; for send tags.

just like:

&lt;script src="widget"&gt;
&lt;/script &gt;

output:

<script src="widget">

</script >

Upvotes: 7

Related Questions