Ignore Special Characters from Expose Filter
in hook_form_alter function you can check the expose form and write your below function. 

function clean($string) {
   $string = str_replace(' ', '-', $string); // Replaces all spaces with hyphens.

return preg_replace('/[^A-Za-z0-9-]/', '', $string); // Removes special chars.
}

assign value to form value array.