HTML Tidy bug fix: broken attributes, and preserve whitespace properly