Fixes #7483 - Use hidden input value to hold raw template contents

Store the in-progress template in the value of a hidden input tag rather than the text content of a hidden div tag.