Fix a number of regressions in html_exporter.py.