I have a micro-template bringing in strings from a rest call, but the strings are not formatted in the way they were originally entered.
The following works:
<%= message.replace(new RegExp('\d', 'g'), '<br /><br />') %>
However, this allows scripts to be entered and will execute when the template is shown. I also tried this:
<%- message.replace(new RegExp('\d', 'g'), '<br /><br />') %>
But this just prints <br />
text in the html. Basically I need a combination of the two, allowing the template to create the new line without letting scripts entered from the rest call through.