I’m creating a script that will send emails to affiliates. There is a Javascript code that I want to email to clients. But when I email Javascript code, Outlook and other web email clients interpret this code as Javascript. I want them to read this Javascript code as a string or normal text. <pre> and <code> tags didn’t work for me. Even my browser treats this code as Javascript.
Also I would like to tell that I’m using the TinyMCE as editor to write emails.
<script>
//some code goes here
</script>
I want to email this as normal text and want to show in the browser.
if you want it to be readable instead of executable, why not html encode it ?
cant imagine they pick up “<script>alert("test");</script>” as javascript.
also, you can just attach a file with the code in it, just don’t name it .js