Last modified: 2009-03-18 22:01:35 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T20022, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 18022 - Special:Import now eating all ampersands
Special:Import now eating all ampersands
Status: RESOLVED DUPLICATE of bug 16554
Product: MediaWiki
Classification: Unclassified
Export/Import (Other open bugs)
1.15.x
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-03-17 20:04 UTC by Dan Jacobson
Modified: 2009-03-18 22:01 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Dan Jacobson 2009-03-17 20:04:05 UTC
Special:Import will eat all ampersands!
Do not use Special:Import unless you want your imports damaged.
Same problem for importDump.php.
Your file will not make the round trip Special:Export ->
Special:Import unscathed! importTextFile.php is safe though.

Proof:
Make a page called [[Test]] whose wikitext is:
1&2&[http://x.y/bla?o&p=q&r=s&v=t ooo]
Then run this shell script:
site=http://my.example.com
POST "$site/index.php?title=Special:Export&action=submit" <<EOF|tee 1.xml|sed s/Test/Test2/ > 2.xml
catname=&nsindex=0&pages=Test&curonly=1&wpDownload=1
EOF
diff -U0 [12].xml
#Then import 2.xml via Special:Import or importDump.php. Then
for i in '' 2
do GET "$site/index.php?title=Test$i&action=raw"; echo
done

You will see:
-    <title>Test</title>
+    <title>Test2</title>
1&2&amp;[http://x.y/bla?o&p=q&r=s&amp;v=t ooo]
12amp;[http://x.y/bla?op=qr=samp;v=t ooo]

The last line is the mangled result.
Tested on a wiki with $wgLanguageCode='zh-tw'. Probably affects en too.
Comment 1 Mike.lifeguard 2009-03-17 20:06:12 UTC
(In reply to comment #0)
> Special:Import will eat all ampersands!

Please try not to be hyperbolic.
Comment 2 Brion Vibber 2009-03-18 22:01:35 UTC

*** This bug has been marked as a duplicate of bug 16554 ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links