Print raw html strings on EJS

You should use html code everywhere, and use the EJS tags only where you need dynamic data. Example:

<a href="https://stackoverflow.com/questions/8124583/<%= user.id %>"><%= user.name %</a>

To specifically answer your question you can use <%- "<tags_here>" %> to output unescaped HTML data.

Leave a Comment