mediawiki.jqueryMsg: Refactor handling of replacements/parameters in links
authorBartosz Dziewoński <matma.rex@gmail.com>
Mon, 5 Oct 2015 09:45:08 +0000 (11:45 +0200)
committerBartosz Dziewoński <matma.rex@gmail.com>
Mon, 5 Oct 2015 12:44:59 +0000 (12:44 +0000)
commitf04024b8a00348752ca855e5e257bc591d762369
treee3b1e880cb7cd516a1eb3c9a0218271527e0825f
parentd21c75418d856b06dcb6307c6f01ddda40f30b3c
mediawiki.jqueryMsg: Refactor handling of replacements/parameters in links

You should now be able to use replacements/parameters (such as '$1')
anywhere inside both link text and link target, in both external links
('[http://foo/ Bar]') and wikilinks ('[[Foo|Bar]]').

As a side effect of various cleanups, HTML in link text is now preserved
in all cases and is never wrapped in <span class="mediaWiki_htmlEmitter">.

Added test cases for it all.

Bug: T49395
Bug: T50064
Change-Id: I56d8f7ec03a70f5c2360d9c5099496ecb2f668ad
resources/src/mediawiki/mediawiki.jqueryMsg.js
tests/qunit/suites/resources/mediawiki/mediawiki.jqueryMsg.test.js