Changed how the template is rendered for proper safe strings