Fixes #7483 - Use hidden input value to hold raw template contents (CVE-2014-3653)

Merge conflicts
Fixes #746 - Generate all the Host template when click on Build to avoid errors during installation.