Robert Jones wrote:
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:
Where are you submitting it, exactly? In a wiki page or something else? A regular wiki page? A user javascript page? MediaWiki:Monobook.js?
Where is the replaced text, exactly? In the source text stored in the database? In the edit box editing the page again? In the rendered text? In the output reading the .js?
Have you modified the wiki? In wiki-allowed HTML, onsubmit is barred (not to mention <form>) and should not be showing up in output to begin with. If you have changed it, exactly what have you changed? Or are you working in an <html> section, or perhaps a custom extension that outputs HTML?
What MediaWiki version are you using? What PHP version? Have you made any non-standard PHP configuration options such as magic_quotes_runtime (this will fatally break things if on)?
There is a bug up through 1.4.5 where HTML attribute normalization in wiki-allowed HTML tags have ' incorrectly escaped in HTML output. This is fixed in 1.5 and in REL1_4 from CVS (note there's currently a breaking database change for some pages, which is why 1.4.6 has not been released yet; this is unrelated to the parser changes).
-- brion vibber (brion @ pobox.com)