have the UI use full country names, and state names outside the US...
[freeside.git] / FS / FS / cust_main_county.pm
index 7344e9c..17f3460 100644 (file)
@@ -196,7 +196,7 @@ 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( $dstate = $state ) =~ s/\n//g;
+      ( my $dstate = $state ) =~ s/[\n\r]//g;
       my $text = $dstate || '(n/a)';
       $script_html .= qq!opt(what.form.${prefix}state, "$dstate", "$text");\n!;
     }
@@ -251,7 +251,7 @@ END
   foreach my $state ( sort keys %{ $cust_main_county{$selected_country} } ) {
     my $text = $state || '(n/a)';
     my $selected = $state eq $selected_state ? 'SELECTED' : '';
-    $state_html .= "\n<OPTION $selected VALUE=$state>$text</OPTION>"
+    $state_html .= qq(\n<OPTION $selected VALUE="$state">$text</OPTION>);
   }
   $state_html .= '</SELECT>';
 
@@ -265,7 +265,7 @@ END
       keys %cust_main_county
   ) {
     my $selected = $country eq $selected_country ? ' SELECTED' : '';
-    $country_html .= "\n<OPTION$selected>$country</OPTION>"
+    $country_html .= qq(\n<OPTION$selected VALUE="$country">$country</OPTION>");
   }
   $country_html .= '</SELECT>';