Love this code...did not notice the glich with IE until I read the whole thread. This worked for me....
Code:
<script type="text/javascript">
function checkURL()
{
if ((url.indexOf("http://")!=url.lastIndexOf("http://"))||url.lastIndexOf("http://")!=0){return false;}
if (url.indexOf('"')>=0) {return false;}
if (url.indexOf("http://maps.google")!=0){return false;}
return true
}
var browser=navigator.appName;
tot='{param}';
tot=tot.substr(tot.indexOf("src="")+10,tot.length);
url=tot.substr(0,tot.indexOf("""));
urlp=url.replace(/;amp;/g,';');
url=urlp;
if (checkURL())
{
document.write('<iframe width="640" height="480" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="'+url.replace(/\[url\]|\[\\url\]/gi,"")+'"></iframe>');
}
else
{
document.write("<p><b>Wrong map URL, edit the post to change it.</b></p> Reload the page when finished to check if correct.");
}
</script>
The only change is in the document.write statement for iframe... changing +url+ to replace with a regular expression...no need to detect the browser since the replaced text does not exist when it is working.
Code:
url.replace(/\[url\]|\[\\url\]/gi,"")
I tried cleaning up the URL before the if statement but it kept failing. Adding the replace text directly in the document.write worked fine.
Enjoy..