title: Escape character in MVC view JavaScript
body: <p>I have a page with this line:</p>
  
  <pre><code>  &lt;input type="button" title="Join" value="Join" onclick="if(confirm('Are you sure you want to join @item.name.ToString() ?')) {location.href='@Url.Action("JoinTeam", "Team", new { id = item.id })'}" /&gt;&amp;nbsp;
  </code></pre>
  
  <p>The <code>@item.name.ToString()</code> has a singe quote (<code>'</code>) in it and I need to escape it.</p>
  
  <p>When I look at the raw HTML the <code>'</code> is <code>&amp;#39</code>.</p>