Last modified: 2009-03-07 13:52:28 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 T19836, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 17836 - XML contains invalid character from page title
XML contains invalid character from page title
Status: RESOLVED INVALID
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
unspecified
PC Windows XP
: Normal normal (vote)
: ---
Assigned To: Roan Kattouw
http://en.wikipedia.org/w/api.php?act...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-03-07 08:40 UTC by Derrick Coetzee
Modified: 2009-03-07 13:52 UTC (History)
3 users (show)

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


Attachments

Description Derrick Coetzee 2009-03-07 08:40:13 UTC
Some characters permitted in page titles are invalid XML characters, but titles are embedded directly in XML attributes. For example, the article "Wolfson Children’s Hospital" on English Wikipedia is included in this contributions listing:

http://en.wikipedia.org/w/api.php?action=query&format=xml&list=usercontribs&ucuser=Mgreason&uclimit=500&ucdir=newer&ucprop=ids|title&ucstart=2008-07-16T20:03:47Z

A strict XML parser will reject this XML because the character "’" is invalid. Attributes containing titles containing special characters need to be escaped.
Comment 1 Derrick Coetzee 2009-03-07 08:55:57 UTC
Never mind, I checked and 0x2019 is a valid XML character. I believe I'm doing something wrong in my API client.
Comment 2 Derrick Coetzee 2009-03-07 09:04:33 UTC
Okay, sorry to double guess myself but I'm pretty sure this is because my XML parser thinks the curly quote apostrophe is trying to close the attribute value. I don't know whether the problem is on the XML generator or XML parser side, but reopening in any case.
Comment 3 Roan Kattouw 2009-03-07 12:51:08 UTC
Reclosing as INVALID. Both Firefox's XML parser and the W3C validator say that the URL you mentioned is a valid XML document.
Comment 4 Derrick Coetzee 2009-03-07 13:52:28 UTC
Sorry, my mistake, there was a problem with the encoding I was using to read it. After resolving this there was no problem.

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


Navigation
Links