title: MVC - Handling unterminated string literal for new line
body: <p>In my MVC view am having the below piece of code</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  @foreach (var item in Model.Test)
  {
  &lt;text&gt; jsFunction(@item.someValue);  &lt;/text&gt;
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>Where am calling the  Javascript function based on the data i get from model dynamically.</p>
  
  <p>For Example At run time it is rendered like below based on the model data</p>
  
  <pre><code>jsFunction("Works Fine");  
  jsFunction("works Fine"); 
  </code></pre>
  
  <p>Which correctly calls my javascript function</p>
  
  <p>But in case of a new line getting <strong>"unterminated string literal"</strong> because of the new line</p>
  
  <pre><code>jsFunction("not working
  with new line"); 
  </code></pre>
  
  <p>What is the best way to handle this Scenario</p>
  
  <p>Thanks</p>