Avoid parsing HTML when creating <input> nodes
authorBartosz Dziewoński <matma.rex@gmail.com>
Thu, 18 Feb 2016 02:07:08 +0000 (03:07 +0100)
committerBartosz Dziewoński <matma.rex@gmail.com>
Thu, 18 Feb 2016 02:07:08 +0000 (03:07 +0100)
commit23fbf4aa221eae83196e63475cc55c4677e0abc2
tree09025867a9929e11f33784be1b6d1d77a1f8c9c5
parentb0f39a110f0f3c6ea0ff2f684408092ebc837af9
Avoid parsing HTML when creating <input> nodes

We used to create them like $( '<input type="checkbox" />' ), which
actually does HTML parsing under the hood, because on IE 8 and lower
trying to change the 'type' of an <input> node throws an exception.
But we dropped support for IE 8 recently and no longer need to do that.

Upstream change for OOjs UI is I166f5ab0dce5ab47dc6a1f4e2e5ad012635911ed.

Find:         \$\( '<input type="(\w+)" ?/?>' \)
Replace with: $( '<input>' ).attr( 'type', '\1' )

Change-Id: Ie86f8917e8ce100de22006516daa542ad178aab6
resources/src/mediawiki.special/mediawiki.special.search.js
resources/src/mediawiki.widgets.datetime/DateTimeInputWidget.js
resources/src/mediawiki.widgets/mw.widgets.DateInputWidget.js
resources/src/mediawiki/api/upload.js
tests/qunit/suites/resources/jquery/jquery.byteLimit.test.js