Justin French wrote:


    <div onmouseover="myFunc('foo','bah')">...</div>
will break terribly when converted to
    <div onmouseover='myFunc('foo','bah')'>

This might actualy not be such a big problem if you HTMLEncodes your inline javascript.
This seems to work in IE 6, FF 0.8, OP 6 and NN 4.7 (win)
<a href="javascript: alert(&quot;test&quot;);">test</a>
<a href="#" onclick="alert(&quot;test&quot;);return false;">test</a>
<a href='javascript: alert(&quot;test&quot;);'>test</a>
<a href='#' onclick='alert(&quot;test&quot;);return false;'>test</a>
<a href="javascript: alert(&#39;test&#39;);">test</a>
<a href="#" onclick="alert(&#39;test&#39;);return false;">test</a>
<a href='javascript: alert(&#39;test&#39;);'>test</a>
<a href='#' onclick='alert(&#39;test&#39;);return false;'>test</a>


Personaly, I would recommend using an external .js file.


--
Kristof
*****************************************************
The discussion list for http://webstandardsgroup.org/
*****************************************************




Reply via email to