Last modified: 2011-01-25 01:01:42 UTC
When using the special:export for to export pages, if the include templates option is checked, the output will include two copies of any page whose title contains an underscore. The workaround is just to replace each underscore with a space. Bug is reproducable on the live sites (i.e. wikipedia) as well as a local wiki on the released version, so it looks like it's been around awhile.
I can't confirm this on the live sites or my local install. Can you give an example page that does this?
Created attachment 5826 [details] sample script to call export
I just saw the behavior on english wikipedia with the page "Main_Page", although any other page should have the same behavior. It can be easily seen from a simple perl script (see attachment): >perl bug.pl | grep '<title>Main' <title>Main Page</title> <title>Main Page</title>
Ah I got it. Confirmed. Dunno why I didn't see it before.
Fixed in r48938
That revision does not fix the bug. There are still plenty of ways to export duplicate titles, using non-normalised input, e.g.: main Page :Main Page __Main Page It needs to be done properly with Title::newFromText().
Done in r53521