Added safeHtml template function