trying to keep sane while fixing insane HTML documents