templates: clean up generated HTML a bit by removing whitespace