I am trying to set up an RSS parser on a private wiki that uses the following for onsubmit:
onsubmit="if(window.myInterval){window.clearInterval(window.myInterval);}if( importXML('rssLocal.php?feedURL='+escape(this.feedURL.value),'parseRSS',fals e,2000)){if(parseFloat(this.interv.value)){window.myInterval=window.setInter val('importXML('rssLocal.php?feedURL='+escape(this.feedURL.value)+'','par seRSS',false,2000);',parseFloat(this.interv.value)*60000);}}else{alert('You r browser cannot import XML, so it cannot view RSS feeds using this script');}return false;"
The problem is that when I submit the page, every ' is replaced by a ' giving:
onsubmit="if(window.myInterval){window.clearInterval(window.myInterval);}if( importXML('rssLocal.php?feedURL='+escape(this.feedURL.value),'parseRSS', false,2000)){if(parseFloat(this.interv.value)){window.myInterval=window.setI nterval('importXML(\'rssLocal.php?feedURL='+escape(this.feedURL.value)+' \',\'parseRSS\',false,2000);',parseFloat(this.interv.value)*60000);}}els e{alert('Your browser cannot import XML, so it cannot view RSS feeds using this script');}return false;"
Is there a way to stop this from happening? Or does is break something else if this is stopped?
I have tried calling the code in a non-wiki .js page, but this doesn't work and I would like the code to be in the wiki so it can be edited.
Hope you can help, many thanks.