mediawiki.userSuggest: Use formatversion=2 for API request
authorFomafix <fomafix@googlemail.com>
Wed, 27 Jan 2016 13:56:31 +0000 (13:56 +0000)
committer[[mw:User:Fomafix]] <gerritpatchuploader@gmail.com>
Wed, 27 Jan 2016 13:56:31 +0000 (13:56 +0000)
With formatversion=2 the response uses UTF-8 instead of escape sequences
with hex for encoding of non-ASCII characters (e.g. "\u00e4" for "รค").

The other syntax changes of formatversion=2 have no effect here.

Change-Id: I835308bb0df80cc9335da06fb8c57844eddd3361

resources/src/mediawiki/mediawiki.userSuggest.js

index 02a90fc..99e9dbe 100644 (file)
@@ -11,6 +11,7 @@
                        api = api || new mw.Api();
 
                        $.data( node, 'request', api.get( {
+                               formatversion: 2,
                                action: 'query',
                                list: 'allusers',
                                // Prefix of list=allusers is case sensitive. Normalise first