decodes html entities in templates