XSS filter in template class