I faced this problem few days back and sorted out a solution after going throught the w3c documentation. As the documentation say :
The named character reference ' (the apostrophe, U+0027) was introduced in XML 1.0 but does not appear in HTML. Authors should therefore use ' instead of ' to work as expected in HTML 4 user agents.
So the solution is that, replace ' by ' and IE6 abd IE7 wont bug you any more. Thank god this time it was Internet Explorer’s bug 😛
Cheers!!
Sachin Khosla