Removing invalid charactors from configuration