mde / ejs

Embedded JavaScript templates -- http://ejs.co

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

<%-%> auto converting \n in <br>

agrobens opened this issue · comments

In my code:

<script type="text/html" id="templatePreviewWhastapp">
<p>Hello</p>
<p><%-message%></p>
</script>
var templatePreviewWhastapp = $('#templatePreviewWhastapp').html();
ejs.render(templatePreviewWhastapp, {message: "Wellcome\nJustin"});

The result is:

<p>Hello</p>
<p>Wellcome<br/>Justin</p>

Why EJS compile text auto converting \n in
?

How to I disable?

Ignore, erro is caused from other script