Set default type attribute for button html elements
authorStephan Gambke <s7eph4n@gmail.com>
Tue, 30 Oct 2012 19:06:16 +0000 (20:06 +0100)
committerStephan Gambke <s7eph4n@gmail.com>
Tue, 30 Oct 2012 20:45:17 +0000 (21:45 +0100)
commit514bdd184d7e736b393210524f996c51059fcedb
tree15825d99c04ba7ce2d44b96a45fa81a95d230806
parented131b321320c109f08d1c5e9c515a63105d1c5f
Set default type attribute for button html elements

According to standard the default type for <button> elements is "submit". Depending on compatibility mode IE might use "button", instead.
To work around the IE bug this patch forces the standard "submit", if nothing is specified explicitly.

See remarks on http://msdn.microsoft.com/en-us/library/ie/ms535211%28v=vs.85%29.aspx :
-----
The default value of the type attribute depends on the current document compatibility mode. The default value is submit. In other compatibility modes the default value is button.
...
Windows Internet Explorer 8 and later. The default value of the type attribute depends on the current document compatibility mode. In IE8 Standards mode, the default value is submit.
In other compatibility modes and earlier versions of Windows Internet Explorer, the default value is button.
-----

Change-Id: I3b97a8cac74bbfca63699dfcbf1cc5e9a2cef193
includes/Html.php
tests/phpunit/includes/HtmlTest.php