HTML provides no means to include the sequence </script>
inside a script element.
XHTML allows you to use CDATA markers or entities, but that isn't an option for HTML. (Note that XHTML served as text/html does not provide this option and browsers will use an HTML parser).
The language used inside the script needs to provide a mechanism to avoid the problem.
In JavaScript, for instance, /
and /
mean the same thing inside a string, so you can "</script>"
.
text/template
isn't a standard MIME type. Presumably it is a custom template format used by some JS on the page. That JS would need to support some form of escaping mechanism when it is parsing the template. You may have to extend whatever library you are using to process your template.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…