how to deal with this kind of problem for example: <img src='abc.jpg' onclick='$("#abc").load("abc.php?value=abc's");'> the problem is in abc's
Change it to: <img src="abc.jpg" onclick="$('#abc').load('abc.php?value=abc\'s');"> HTML: This also makes the tag XHTML compliant (if you add a / before >)