https://github.com/golang/go/issues/18569
I think your comment above isn't quite right. The problem you're seeing is that previously this was escaped as js (incorrect), and now it is escaped as text (correct). If you set your type as above to "text/javascript", it works in go 1.8:
<script type="text/javascript"> <div><%= something %></div> </script>
on 1.8 outputs:
<script type="text/javascript"> <div><%= something %></div> </script>
the one that fails is if you set the type to text/template or similar, which makes sense I guess as it is not js but might be annoying if your library uses <> as delimiters. Should work with text/template though if you mark those snippets as template.HTML type before including in an html/template.
If it is true, please don't use the text template as a quick fix. A lot if security thinking went into the html template and without it you will have xss all over your code.
Edit: sure enough, it validates type against know values and I assume jsx is not over of them.
Use <script type="text/ejs">?
<script type="<%= js_mime %>"> <div><%= something %>
then it won't be escaped presumably as js, but it will become js when it is run through the other templating system. sentiental have you tried that approach?
Given the following literal:
<script type="text/javascript"> <div><%= something %></div> </script>
Go 1.8 will escape the EJS delimiter, breaking the template. I.e.:
<script type="text/javascript"> <div><%= something %></div> </script>
I selected EJS specifically because I wanted a templating library that didn't conflict with html/template's handlebars syntax. If you're in the same boat you'll want to find a template engine with non-html entity delimiters.