Passing & symbol in jquery
<p>I am trying to insert an email link using jquery, but if the email body has a <code>&amp;</code> in it, it will not work.</p>

<pre><code>$('#em_button').html('&lt;a href="mailto:?subject=A Photo: ' + js_images[getImg].title + '&amp;body=I thought you would like this photo: ' + thisPage + '?id=' + getGall + '&amp;img=' + js_images[getImg].filename + '"&gt;&lt;img src="' + homeUrl + '/' + tUrl + '/img/email.png" title="Email this photo" /&gt;&lt;/a&gt;');
</code></pre>

<p>The part that is breaking it is <code>&amp;img=</code>. I've tried using <code>&amp;amp;</code> but that didnt work either. Any suggestions?</p>

<p>Note: If there is no <code>&amp;</code>, everything works fine.</p>
