Added proper support for HTML5 doctype