Last modified: 2014-04-28 14:33:53 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 T66486, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 64486 - map html entity in query-continue
map html entity in query-continue
Status: RESOLVED INVALID
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-04-26 17:07 UTC by Thomas
Modified: 2014-04-28 14:33 UTC (History)
4 users (show)

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


Attachments

Description Thomas 2014-04-26 17:07:15 UTC
it is required, to map html entities if I work with xml, or it is feature to enforce migration to json ;-) ?

XML:
<?xml version="1.0"?><api><query-continue><allpages apcontinue="&amp;" /></query-continue><query><allpages>...

JSON:
{"query-continue":{"allpages":{"apcontinue":"&"}},"

/api.php?action=query&apfrom=%26amp%3B&aplimit=...
Comment 1 Andre Klapper 2014-04-28 06:36:39 UTC
Hi Thomas,
is this a question? If so, [[mw:Project:Support_desk]] is the correct place. If you think this is a bug, please explain what the problem is that you see.
Comment 2 Thomas 2014-04-28 11:35:04 UTC
I think it's a bug, because Brad wrote in his mail "Clients should be treating the returned key-value pairs [of query-continue] as opaque data to be returned to the server with the subsequent query."

I think opaque data, don't have to be parsed/interpreted (except unescapeing).

The following request with url encoded '&amp;' -> '%26amp%3B' is not okay:
/api.php?action=query&apfrom=%26amp%3B...
http://en.wikipedia.org/w/api.php?action=query&list=allpages&apfrom=%26amp%3B&aplimit=1

but: /api.php?action=query&apfrom=%26&...
is okay

btw: I don't know if only allpages is affected
Comment 3 Brad Jorsch 2014-04-28 14:20:42 UTC
This isn't a bug at all, so closing as INVALID. I'll assume it's good-faith confusion.

In <allpages apcontinue="&amp;" />, the value is the single character "&". The XML format represents it in an encoded form because a bare "&" is not allowed in XML. It could also be represented as apcontinue="&#x26;" or apcontinue="&#38;", but in either case the actual value being represented remains unchanged.

Just as in this message I'm writing this value as '"&"' even though the double-quotes are not actually part of the value, they're just there to delimit it within the running text.
Comment 4 Thomas 2014-04-28 14:33:53 UTC
silly me, & is the escaping sign

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


Navigation
Links