fix regionselector for CR in region names for some reason
[freeside.git] / FS / FS / cust_main_county.pm
index e50e510..4ea2199 100644 (file)
@@ -193,8 +193,9 @@ END
   foreach my $country ( sort keys %cust_main_county ) {
     $script_html .= "\nif ( country == \"$country\" ) {\n";
     foreach my $state ( sort keys %{$cust_main_county{$country}} ) {
-      my $text = $state || '(n/a)';
-      $script_html .= qq!opt(what.form.${prefix}state, "$state", "$text");\n!;
+      my( $dstate = $state ) =~ s/\n//g;
+      my $text = $dstate || '(n/a)';
+      $script_html .= qq!opt(what.form.${prefix}state, "$dstate", "$text");\n!;
     }
     $script_html .= "}\n";
   }