I have an email that gets sent which outputs the text of HTTP error responses. If the response ever includes Javascript code in <script>
tags (and some HTML code) then the Gmail (and many other email clients) strip out the code.
Also, if there is anything after the </script>
that seems to get stripped out as well.
How can I make it so that the Javascript code is not stripped out and just gets included as plain text in the body of an HTML email?
I think you can use HTML entities
<script>code</script>
or
<script>code</script>
should become
<script>code</script>
when rendered
You can use this tool
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.