trailText override

Also ensures any input HTML is valid.