Enhancement to the HTML minifier, plus an utility method.