title: How to escape & in a POST request in jQuery?
body: <p>i have an input element with &amp; in value:</p>
  
  <pre><code>&lt;input type="checkbox" value="Biografie, životopisy, osudy, Domácí rock&amp;amp;pop" /&gt;
  </code></pre>
  
  <p>When i try sending it through an ajax request:</p>
  
  <pre><code>$.ajax({
      type: "POST",
      url: "/admin/kategorie/add/link.json",
      data: "id="+id+"&amp;value="+value+"&amp;type="+type,
      error: function(){alert('Chyba! Reloadněte prosím stránku.');}
  });
  </code></pre>
  
  <p>the post data that actually gets sent is:</p>
  
  <pre><code>id: 1
  pop:
  type: e
  value: Biografie, životopisy, osudy, Domácí rock
  </code></pre>
  
  <p>*Note that all the variables in data are defined and value contains $(thatInputElement).attr('value').</p>
  
  <p>How can I escape the <code>&amp;amp;</code> properly so that post field <code>value</code> would contain <code>Biografie, životopisy, osudy, Domácí rock&amp;amp;pop</code>?</p>