adds html entities
fixes displaying error messages