The workarounds to handle client-side templating seem dirty. Is it really true that e.g. Handlebars requires you to send illegal HTML to the browser? That seems like such a bad idea.
I build all my templates in HTML, and then store all the different content to populate the templates in script tags. I can then use JavaScript to swap it out, and even hide/reveal unused templates.
It's 100% valid though, handlebars are not valid HTML, at least not until processed and rendered.
The big issue right now is IE support, but most browsers are coming along with it: