jqueryMsg: Don't fall back to simple parser when jQuery params passed
authorRoan Kattouw <roan.kattouw@gmail.com>
Mon, 15 Oct 2018 18:53:32 +0000 (11:53 -0700)
committerRoan Kattouw <roan.kattouw@gmail.com>
Tue, 16 Oct 2018 19:20:09 +0000 (12:20 -0700)
commit8d1844704ad6d069fca9f28e41e40ae7b49a153a
tree7b1871915f5b406e37794a480bf1b672646f6d16
parentf3b012b51f492155cd7acf4d7f641cd43147bfc0
jqueryMsg: Don't fall back to simple parser when jQuery params passed

jqueryMsg parsing is required when the message body contains wikitext,
but it is also required when one of the parameters is a jQuery object.

Without this change, the following doesn't work:
mw.messages.set( 'foo', 'Hello $1' );
mw.message( 'foo', $( '<a>' ).text( 'World' ) ).parse();

(But if the message contained e.g. {{PLURAL:}} syntax, it did work.)

Change-Id: I445f9194bb8b2ed35baafbda30d1d0d008b64e2c
resources/src/mediawiki.jqueryMsg/mediawiki.jqueryMsg.js
tests/qunit/suites/resources/mediawiki/mediawiki.jqueryMsg.test.js