Added function to conservatively minify HTML in templates files