Last modified: 2011-04-30 01:20:58 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 T21828, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 19828 - Invalid chars in the output
Invalid chars in the output
Status: RESOLVED INVALID
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
1.15.x
All All
: Normal normal (vote)
: ---
Assigned To: Roan Kattouw
http://wiki.guildwars.com/api.php?act...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-07-19 17:07 UTC by Ouroboros
Modified: 2011-04-30 01:20 UTC (History)
4 users (show)

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


Attachments

Description Ouroboros 2009-07-19 17:07:25 UTC
Hi, in some case, there's invalid chars in the output. The following query show that :

http://wiki.guildwars.com/api.php?action=query&prop=revisions&titles=Game link:Skill 2898&rvprop=content&format=php

In "trunk/phase3/includes/Title.php" there's a code snippet which cleans these chars :

# Strip Unicode bidi override characters.
# Sometimes they slip into cut-n-pasted page titles, where the
# override chars get included in list displays.
$dbkey = preg_replace( '/\xE2\x80[\x8E\x8F\xAA-\xAE]/S', '', $dbkey );


When I get results from the API, I have to clean the content with this regex before using it (and it works).
I don't know if this bug come from the API or the MediaWiki core code.
Comment 1 Splarka 2009-07-19 20:04:52 UTC
Where is the bug? When you ask for prop=revisions you get /exactly/ what you ask for: the contents of the page. In this case the contents are: "#REDIRECT [[self:Dark Aura (Deactivating R.O.X.)\u200e\u200e\u200e]]". 

The Title.php regex only strips these out when parsing the title (in this case, to make a redirect): http://wiki.guildwars.com/api.php?action=query&redirects&titles=Game%20link:Skill%202898

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


Navigation
Links