Temp fix for nested error + template tag support

Implemented temporary fix for the nested template error. Now also
support template html tags for templates, as well as script tags