Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
agrobens opened this issue Oct 6, 2023 · 1 comment
Closed

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

agrobens opened this issue Oct 6, 2023 · 1 comment

Comments

@agrobens
Copy link

agrobens commented Oct 6, 2023

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?

@agrobens agrobens changed the title <%%> auto converting \n in <br> <%-%> auto converting \n in <br> Oct 6, 2023
@agrobens
Copy link
Author

agrobens commented Oct 6, 2023

Ignore, erro is caused from other script

@agrobens agrobens closed this as completed Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant