HTML validation fixes.
Merge pull request #1186 from phaidon/html-validation-fix

HTML validation patch.