[freeside-commits] freeside/FS/FS cust_bill.pm,1.297,1.298
Ivan,,,
ivan at wavetail.420.am
Sun Oct 31 17:23:23 PDT 2010
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv1855
Modified Files:
cust_bill.pm
Log Message:
fix   showing up in sections as a result of CDR formatting kludge, RT#10275
Index: cust_bill.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_bill.pm,v
retrieving revision 1.297
retrieving revision 1.298
diff -u -w -d -r1.297 -r1.298
--- cust_bill.pm 31 Oct 2010 21:48:57 -0000 1.297
+++ cust_bill.pm 1 Nov 2010 00:23:21 -0000 1.298
@@ -2291,10 +2291,12 @@
my $nbsp = $nbsps{$format};
my %escape_functions = ( 'latex' => \&_latex_escape,
- 'html' => \&_html_escape, #\&encode_entities,
+ 'html' => \&_html_escape_nbsp,#\&encode_entities,
'template' => sub { shift },
);
my $escape_function = $escape_functions{$format};
+ my $escape_function_nonbsp = ($format eq 'html')
+ ? \&_html_escape : $escape_function;
my %date_formats = ( 'latex' => '%b %o, %Y',
'html' => '%b %o, %Y',
@@ -2598,7 +2600,7 @@
my $extra_lines = ();
if ( $multisection ) {
($extra_sections, $extra_lines) =
- $self->_items_extra_usage_sections($escape_function, $format)
+ $self->_items_extra_usage_sections($escape_function_nonbsp, $format)
if $conf->exists('usage_class_as_a_section', $cust_main->agentnum);
push @$extra_sections, $adjust_section if $adjust_section->{sort_weight};
@@ -2607,13 +2609,13 @@
push @sections,
$self->_items_sections( $late_sections, # this could stand a refactor
$summarypage,
- $escape_function,
+ $escape_function_nonbsp,
$extra_sections,
$format, #bah
);
if ($conf->exists('svc_phone_sections')) {
my ($phone_sections, $phone_lines) =
- $self->_items_svc_phone_sections($escape_function, $format);
+ $self->_items_svc_phone_sections($escape_function_nonbsp, $format);
push @{$late_sections}, @$phone_sections;
push @detail_items, @$phone_lines;
}
@@ -3165,10 +3167,14 @@
$value;
}
-
sub _html_escape {
my $value = shift;
encode_entities($value);
+ $value;
+}
+
+sub _html_escape_nbsp {
+ my $value = _html_escape(shift);
$value =~ s/ +/ /g;
$value;
}
More information about the freeside-commits
mailing list