ApiSandbox: Better handling of parsed messages
authorBrad Jorsch <bjorsch@wikimedia.org>
Mon, 28 Nov 2016 17:01:27 +0000 (12:01 -0500)
committerBrad Jorsch <bjorsch@wikimedia.org>
Mon, 28 Nov 2016 17:05:25 +0000 (12:05 -0500)
commit6ab49b51b1c82abdbb47e004ba0da6417eb79167
treec99a6d52f218925bd785563e6929729a78c5e119
parent140f0dea3439bedb870e27fe0e13322cfa5b570f
ApiSandbox: Better handling of parsed messages

There are several places where we're parsing a message to an HTML string
and passing it into ooui in a way that it'll interpret it as text. There
are more where we're handling it properly, but by parsing HTML strings
outselves instead of letting mw.Message do it.

So, let's add a Util function that will parse a message using
.parseDom() and apply our fixups.

Change-Id: I1f71916ac2fb3567c2fa2dffc64c4c8c91050ee9
resources/src/mediawiki.special/mediawiki.special.apisandbox.js