Merge branch 'master' of git.freeside.biz:/home/git/freeside
authorIvan Kohler <ivan@freeside.biz>
Thu, 28 Feb 2019 05:16:56 +0000 (21:16 -0800)
committerIvan Kohler <ivan@freeside.biz>
Thu, 28 Feb 2019 05:16:56 +0000 (21:16 -0800)
FS/FS/Misc/Pod2Html.pm
FS/FS/part_virtual_field.pm
httemplate/browse/router.cgi
httemplate/edit/elements/part_svc_column.html

index 1dfca04..47ac16f 100644 (file)
@@ -65,12 +65,11 @@ Generates Freeside-themed HTML docuemtnation from installed perl modules
 sub fs_pod2html {
   fs_pod2html_from_dirs(
     shift,
-    '/usr/local/share/perl/5.24.1',
+    grep( {-d} glob('/usr/local/share/perl/*')),
     '/usr/local/bin',
     $include_system_perl_modules ? (
       '/usr/share/perl5',
-      '/usr/share/perl/5.24',
-      '/usr/share/perl/5.24.1',
+      grep {-d} glob('/usr/share/perl/*'),
     ) : (),
   );
 }
@@ -92,12 +91,9 @@ sub fs_pod2html_from_src {
     'bin',
     'FS',
     'fs_selfservice/FS-SelfService',
-    # '/usr/local/share/perl/5.24.1',
-    # '/usr/local/bin',
     $include_system_perl_modules ? (
       '/usr/share/perl5',
-      '/usr/share/perl/5.24',
-      '/usr/share/perl/5.24.1',
+      grep {-d} glob('/usr/share/perl/*'),
     ) : (),
   );
 
index 63712b7..eae519f 100755 (executable)
@@ -2,7 +2,7 @@ package FS::part_virtual_field;
 use base qw(FS::Record);
 
 use strict;
-use CGI qw(escapeHTML);
+use HTML::Entities;
 use FS::Schema qw( dbdef );
 
 =head1 NAME
@@ -89,14 +89,14 @@ sub widget {
 
   if ($ui_type eq 'HTML') {
     if ($mode eq 'view') {
-      $text = q!<TR><!.$header_col_type.q! ALIGN="right">! . $label .
-              q!</!.$header_col_type.q!><TD BGCOLOR="#ffffff">! . $value .
+      $text = q!<TR><!.$header_col_type.q! ALIGN="right">! . encode_entities($label) .
+              q!</!.$header_col_type.q!><TD BGCOLOR="#ffffff">! . encode_entities($value) .
               q!</TD></TR>! . "\n";
     } elsif ($mode eq 'edit') {
-      $text = q!<TR><!.$header_col_type.q! ALIGN="right">! . $label .
+      $text = q!<TR><!.$header_col_type.q! ALIGN="right">! . encode_entities($label) .
               q!</!.$header_col_type.q!><TD>!;
         $text .= q!<INPUT TYPE=text NAME="! . $self->name .
-                q!" VALUE="! . escapeHTML($value) . q!"!;
+                q!" VALUE="! . encode_entities($value) . q!"!;
         if ($self->length) {
           $text .= q! SIZE="! . $self->length . q!"!;
         }
index c7713f3..3541118 100644 (file)
@@ -17,8 +17,6 @@
 %>
 <%init>
 
-use CGI qw(escapeHTML);
-
 die "access denied"
   unless $FS::CurrentUser::CurrentUser->access_right('Broadband configuration')
   || $FS::CurrentUser::CurrentUser->access_right('Broadband global configuration');
@@ -50,8 +48,8 @@ my @links = ( [ "${p2}edit/router.cgi?", 'routernum' ],
             );
 
 foreach (FS::router->virtual_fields_hash) {
-  push @header_fields, escapeHTML($_->{'label'});
-  push @fields, escapeHTML($_->{'name'});
+  push @header_fields, encode_entities($_->{'label'});
+  push @fields, encode_entities($_->{'name'});
   push @links, '';
 }
 
index 075f15e..bdbce7c 100644 (file)
@@ -97,7 +97,7 @@ my %communigate_fields = (
     <TD ROWSPAN=2 CLASS="grid">
       <INPUT NAME="<% $svcdb %>__<% $field %>_label"
              STYLE="text-align: right"
-             VALUE="<% $part_svc_column->columnlabel || escapeHTML($def->{'label'}) |h %>">
+             VALUE="<% $part_svc_column->columnlabel || $def->{'label'} |h %>">
     </TD>
 
     <TD ROWSPAN=1 CLASS="grid">