title: use a string with newlines in javascript
body: <p>I'm using a template engine and have the following JavaScript code </p>
  
  <pre><code> &lt;script&gt;
      alert('{{entity.body}}');
   &lt;/script&gt;
  </code></pre>
  
  <p>Unfortunately the body has new line characters so the script throws a syntax error because it's looking for a <code>\</code> in a multiline string. What's the standard way to deal with this issue? </p>
  
  <p>Thanks.</p>