In my index.ejs I have this code:
var current_user = <%= user %>
In my node I have
app.get(\"/\", function(req, res){
Oh that was easy, don't use <%=, use <%- instead. For example:
<%=
<%-
<%- JSON.stringify(user) %>
The first one will render in HTML, the second one will render variables (as they are, eval)