mediawiki.api.category: Avoid exceptions
authorFomafix <fomafix@googlemail.com>
Mon, 29 Jan 2018 11:57:00 +0000 (12:57 +0100)
committerFomafix <fomafix@googlemail.com>
Fri, 2 Feb 2018 15:14:46 +0000 (16:14 +0100)
commit1b525abda4b56bafb531092cadb735ea9a11973c
tree5fcde5431a9a192a84f2da9ab61a738f63964f66
parent13059f123c8dccc5e015ecec045b504f8688c24e
mediawiki.api.category: Avoid exceptions

This change avoids some exceptions in processing the API response
* Ensure that a "|" in the title is not interpreted as multi value
  separator.
* The key query is missing on empty title.
* The key query.pages is missing on title="#" or title="mw:".

Change-Id: Idc82412337d0733cc58a78b1e202f5fdfd8f31cd
resources/src/mediawiki/api/category.js
tests/qunit/suites/resources/mediawiki.api/mediawiki.api.category.test.js