To have xml-well-formed HTML templates with fluid, javascript code blocks must be put inside a CDATA section.
Bug with fluid:
CDATA was recommended once:
CDATA is still recommended: