mediawiki.page.patrol.ajax: Use formatversion=2 for API requests
authorFomafix <fomafix@googlemail.com>
Tue, 26 Jan 2016 14:47:27 +0000 (14:47 +0000)
committer[[mw:User:Fomafix]] <gerritpatchuploader@gmail.com>
Tue, 26 Jan 2016 14:47:27 +0000 (14:47 +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: I0937cb0e9f757758cbaf0a2fd8dc0ef2c9a13c64

resources/src/mediawiki/page/patrol.ajax.js

index f9b0d35..a63202f 100644 (file)
@@ -31,6 +31,7 @@
                        apiRequest = new mw.Api();
 
                        apiRequest.postWithToken( 'patrol', {
+                               formatversion: 2,
                                action: 'patrol',
                                rcid: rcid
                        } )