Escaping html using ajax

Escaping html using ajax

OK, I've googled myself sick trying to find the answer to this question, but I can't seem to get a straight answer.  Here's the setup:

<a href="void();" onClick="jQuery('div#content').load('/cgi-bin/script.pl',{id:$id}); return false;">Link text</a>

Clicking this link works great.  The data is loaded into the content div as expected.  But the problem is the html that is loaded into the div has funny-looking characters where the single and double quotes should be.  (See attachment).

What am I doing wrong here?  What do I need to do in order to make the quotes show up properly?