title: Escape apostrophe when passing parameter in onclick event
body: <p>I'm passing the company name to an onclick event.  Some company names have apostrophes in them.  I added '.Replace("'", "&#39;")' to the company_name field.  This allows the onclick event to fire, but the confirm message displays as "Jane&amp;# 39;s Welding Company".  </p>
  
  <pre><code>&lt;a href="#" onclick="return Actionclick('&lt;%= Url.Action("Activate", new {id = item.company_id}) %&gt;', '&lt;%= Html.Encode(item.company1.company_name.Replace("'", "&amp;#39;")) %&gt;');" class="fg-button fg-button-icon-solo ui-state-default ui-corner-all"&gt;&lt;span class="ui-icon ui-icon-refresh"&gt;&lt;/span&gt;&lt;/a&gt;
  
  &lt;script type="text/javascript"&gt;
  function Actionclick(url, companyName) 
  {
      if (confirm('This action will activate this company\'s primary company ('+companyName+') and all of its other subsidiaries.  Continue?')) 
      {
          location.href = url;
      };
  };
  </code></pre>
  
  <p></p>
  
  <p><strong>EDIT</strong>
  The confirm message shows the &amp;# 39; in the message rather than the '.  When I typed it out here, it replaced the &amp;# 39; with a '.  Added spaces so that wouldn't happen.  I want to know the best way to pass it to my onclick event and also properly display it in the message without doing multiple replaces (if there is a better way).</p>