templates - How to render tags as raw string in underscore? -


give default underscore template setup, how render out "<%", "<%=" raw string?

i know change syntax tags "{{", "{=", need face same problem write these tags raw string.

well, it's not pretty can this:

var tmpl = _.template('underscore: <%= underscore %>, mustache: {{ {='); console.log(tmpl({underscore: "<% <%="})); 

output is:

underscore: <% <%=, mustache: {{ {=