fix for uumlaut problem, RT#10359
authorivan <ivan>
Tue, 2 Nov 2010 00:28:13 +0000 (00:28 +0000)
committerivan <ivan>
Tue, 2 Nov 2010 00:28:13 +0000 (00:28 +0000)
FS/FS/Record.pm
httemplate/edit/cust_main/contact.html
httemplate/view/cust_main/billing.html
httemplate/view/cust_main/contacts.html

index 4f0984c..0df3f44 100644 (file)
@@ -2458,7 +2458,9 @@ May not be null.
 
 sub ut_name {
   my( $self, $field ) = @_;
-  $self->getfield($field) =~ /^([\w \,\.\-\']+)$/
+#  warn "ut_name allowed alphanumerics: +(sort grep /\w/, map { chr() } 0..255), "\n";
+  #$self->getfield($field) =~ /^([\w \,\.\-\']+)$/
+  $self->getfield($field) =~ /^([µ_0123456789aAáÁàÀâÂåÅäÄãêæÆbBcCçÇdDðÐeEéÉèÈêÊëËfFgGhHiIíÍìÌîÎïÏjJkKlLmMnNñÑoOóÓòÒôÔöÖõÕøغpPqQrRsSßtTuUúÚùÙûÛüÜvVwWxXyYýÝÿzZþÞ \,\.\-\']+)$/
     or return gettext('illegal_name'). " $field: ". $self->getfield($field);
   $self->setfield($field,$1);
   '';
index feb61db..99bc558 100644 (file)
@@ -3,8 +3,8 @@
 <TR>
   <TH ALIGN="right"><%$r%>Contact&nbsp;name<BR>(last,&nbsp;first)</TH>
   <TD COLSPAN=5>
-    <INPUT TYPE="text" NAME="<%$pre%>last" VALUE="<% $cust_main->get($pre.'last') %>" onChange="<% $onchange %>" <%$disabled%> <%$style%>> , 
-    <INPUT TYPE="text" NAME="<%$pre%>first" VALUE="<% $cust_main->get($pre.'first') %>" onChange="<% $onchange %>" <%$disabled%> <%$style%>>
+    <INPUT TYPE="text" NAME="<%$pre%>last" VALUE="<% $cust_main->get($pre.'last') |h %>" onChange="<% $onchange %>" <%$disabled%> <%$style%>> , 
+    <INPUT TYPE="text" NAME="<%$pre%>first" VALUE="<% $cust_main->get($pre.'first') |h %>" onChange="<% $onchange %>" <%$disabled%> <%$style%>>
   </TD>
 % if ( $conf->exists('show_ss') && !$pre ) { 
 
@@ -21,7 +21,7 @@
 <TR>
   <TD ALIGN="right">Company</TD>
   <TD COLSPAN=7>
-    <INPUT TYPE="text" NAME="<%$pre%>company" VALUE="<% $cust_main->get($pre.'company') %>" SIZE=70 onChange="<% $onchange %>" <%$disabled%> <%$style%>>
+    <INPUT TYPE="text" NAME="<%$pre%>company" VALUE="<% $cust_main->get($pre.'company') |h %>" SIZE=70 onChange="<% $onchange %>" <%$disabled%> <%$style%>>
   </TD>
 </TR>
 
index dd19523..014ddab 100644 (file)
@@ -132,7 +132,7 @@ Billing information
 
 <TR>
   <TD ALIGN="right">Attention</TD>
-  <TD BGCOLOR="#ffffff"><% $cust_main->payname %></TD>
+  <TD BGCOLOR="#ffffff"><% $cust_main->payname |h %></TD>
 </TR>
 % } elsif ( $cust_main->payby eq 'COMP' ) { 
 
index e88c02e..e91af54 100644 (file)
@@ -10,7 +10,7 @@
 <TR>
   <TD ALIGN="right">Contact name</TD>
   <TD COLSPAN=5 BGCOLOR="#ffffff">
-    <% $cust_main->get("${pre}last"). ', '. $cust_main->get("${pre}first") %>
+    <% $cust_main->get("${pre}last"). ', '. $cust_main->get("${pre}first") |h %>
   </TD>
 % if ( $which eq '' && $conf->exists('show_ss') ) { 
     <TD ALIGN="right">SS#</TD>
 </TR>
 <TR>
   <TD ALIGN="right">Company</TD>
-  <TD COLSPAN=7 BGCOLOR="#ffffff"><% $cust_main->get("${pre}company") %></TD>
+  <TD COLSPAN=7 BGCOLOR="#ffffff"><% $cust_main->get("${pre}company") |h %></TD>
 </TR>
 <TR>
   <TD ALIGN="right">Address</TD>
-  <TD COLSPAN=7 BGCOLOR="#ffffff"><% $cust_main->get("${pre}address1") %></TD>
+  <TD COLSPAN=7 BGCOLOR="#ffffff"><% $cust_main->get("${pre}address1") |h %></TD>
 </TR>
 
 % if ( $cust_main->get("${pre}address2") ) { 
 
   <TR>
     <TD ALIGN="right"><% $address2_label %></TD>
-    <TD COLSPAN=7 BGCOLOR="#ffffff"><% $cust_main->get("${pre}address2") %></TD>
+    <TD COLSPAN=7 BGCOLOR="#ffffff"><% $cust_main->get("${pre}address2") |h %></TD>
   </TR>
 
 % } 
 
 <TR>
   <TD ALIGN="right">City</TD>
-  <TD BGCOLOR="#ffffff"><% $cust_main->get("${pre}city") %></TD>
+  <TD BGCOLOR="#ffffff"><% $cust_main->get("${pre}city") |h %></TD>
 % if ( $cust_main->get("${pre}county") ) {
     <TD ALIGN="right">County</TD>
-    <TD BGCOLOR="#ffffff"><% $cust_main->get("${pre}county") %></TD>
+    <TD BGCOLOR="#ffffff"><% $cust_main->get("${pre}county") |h %></TD>
 % }
   <TD ALIGN="right">State</TD>
-  <TD BGCOLOR="#ffffff"><% state_label( $cust_main->get("${pre}state"), $cust_main->get("${pre}country") ) %></TD>
+  <TD BGCOLOR="#ffffff"><% state_label( $cust_main->get("${pre}state"), $cust_main->get("${pre}country") ) |h %></TD>
   <TD ALIGN="right">Zip</TD>
   <TD BGCOLOR="#ffffff"><% $cust_main->get("${pre}zip") %></TD>
 </TR>