The browser complains saying that: "Expected ')'":
I intentionally wrote a space between the '&' and the '#' so that the browswer won't convert it to ' when you view the message.
<img src="face.gif" onmouseover="func('Guy& #039;s name')">
The content of the string that will be passed to the func function is generated dynamically by PHP and unfortunately it may contain escape characters such as ', ".
I am using a PHP function to convert all applicable characters in the string to HTML entities.
I thought that using this trick will allow me to have nesting of quotes and double quotes.
and this obviously doesn't work.
<img src="face.gif" onmouseover="func('Guy's name')">