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.

I also updated IE_diff_mode by replacing $(#new).contents().text() with $(#new).val(). I don't have means to test this easily, though.