Fix broken value="" stripping for HTML5
authorDaniel Friesen <pub-github@nadir-seen-fire.com>
Thu, 16 Aug 2012 07:37:56 +0000 (00:37 -0700)
committerAntoine Musso <hashar@free.fr>
Sat, 15 Sep 2012 04:26:56 +0000 (21:26 -0700)
commit81f1cace4ca31334fb7c68d2bd9a4ba16061b8b7
tree8defcd55a124e6b7ff46abc3dd0b9473e205ae6f
parenta45e20ff11476e5a6daf7ec177cdd0ee5f850b97
Fix broken value="" stripping for HTML5

The default value for value="" on <input> elements is not always an
empty string.

In particular the default value for type="radio" is "on" and by
stripping value="" out of the attributes a "" becomes "on" and our
cleanup code ends up breaking forms.

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