In EJS (Embedded JavaScript) escaping is a default behaviour. // escape by default <%= VARIABLE_NAME %>
This can easily mess up a couple of things (including JSON, HTML rendering), luckily you can turn it off by using // render out string <%- VARIABLE_NAME %>
Many thanks. I could easily have spent another hour trying to figure out the escaping problem. I was trying to output some quick and dirty XML, and the escaping was driving me crazy!
Ooooh thanks man, I love you. EJS has such poor docs...
ReplyDeleteMany thanks. I could easily have spent another hour trying to figure out the escaping problem. I was trying to output some quick and dirty XML, and the escaping was driving me crazy!
ReplyDeleteThis has left me scratching my head for over a day! Thanks for the great explanation.
ReplyDeleteit helps a lot!Thanks!
ReplyDeleteBig ups!
ReplyDeleteOmg! Love you forever
ReplyDeleteThank you much!
ReplyDelete"I very much enjoyed this article.Nice article thanks for given this information. i hope it useful to many pepole.php jobs in hyderabad.
ReplyDelete"