Minor HtmlUtils cleanup

I did some minor cleanup while looking around the codebase.  I made a bunch of commits to ease code review, feel free to squash them if you choose to merge this.