<body>
<h2>Test of ampersands </h2>
<script language="JavaScript" type="text/javascript" ><!--
location.href="http://www.myhost.org/cgi-bin/SimpleFormAction.pl?cat=felix&dog=fido";
//--></script>
</body>
Note the the "&" in the location.href value have been escaped already to "&".
In Internet Explorer the following is echoed back from the form:
cat = felix
dog = fido
But in Firefox and IE we get,
cat = felix
amp;dog = fido
IE converts the "&" to just "&", although I think Firefox/Opera are doing the right thing not to escape the amp. No charge for this tip today, but be careful in how you specify the ampersand in your hrefs.
No comments:
Post a Comment