mw.ForeignApi: Percent-encode dots in the 'origin' parameter
authorBartosz Dziewoński <matma.rex@gmail.com>
Thu, 14 Apr 2016 17:33:43 +0000 (19:33 +0200)
committerBartosz Dziewoński <matma.rex@gmail.com>
Fri, 15 Apr 2016 16:11:21 +0000 (16:11 +0000)
commite94674443dab28de7f47cc83f2028a3e81ab2a25
treeeeadc8b03e6ccf3df1e7ca12bbb46c19398fd9ad
parent4f49fd4933a39cfcd9e53194b8e01fd2bbd5f9a4
mw.ForeignApi: Percent-encode dots in the 'origin' parameter

Depending on server configuration, MediaWiki may forbid some periods in
URLs, due to an IE 6 XSS bug. If that is the case on the remote wiki,
ForeignApi would previously not be able to contact it.

Also tweaked similar code in mw.Api to make it more obvious what is
the purpose of it, and future-proof against any dots in tokens.

Bug: T132612
Change-Id: I6dc0b4ab18e5756fc7566608192d59d10729db99
resources/src/mediawiki/ForeignApi.js
resources/src/mediawiki/api.js