[freeside-commits] branch master updated. 226fffec6fd0154ea8798b58321d4d119341879f

Mark Wells mark at 420.am
Tue Nov 27 21:45:16 PST 2012


The branch, master has been updated
       via  226fffec6fd0154ea8798b58321d4d119341879f (commit)
      from  cb66e7cac35892a482cf07c7e05db5ff6296c395 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 226fffec6fd0154ea8798b58321d4d119341879f
Author: Mark Wells <mark at freeside.biz>
Date:   Tue Nov 27 21:43:37 2012 -0800

    remove trailing junk from XLSX files, #20337

diff --git a/httemplate/graph/elements/report.html b/httemplate/graph/elements/report.html
index 98b4778..b7073db 100644
--- a/httemplate/graph/elements/report.html
+++ b/httemplate/graph/elements/report.html
@@ -126,8 +126,8 @@ any delimiter and linked from the elements in @data.
 %   $workbook->close();# or die "Error creating .xls file: $!";
 %
 %   http_header('Content-Length' => length($output) );
-%   
-<% $output %>
+%   $m->print($output);
+%
 % } elsif ( $cgi->param('_type') eq 'png' ) {
 %   # delete any items that shouldn't be on the graph
 %   if ( my $no_graph = $opt{'no_graph'} ) {
diff --git a/httemplate/search/customer_accounting_summary.html b/httemplate/search/customer_accounting_summary.html
index 5ce2e3a..5575283 100644
--- a/httemplate/search/customer_accounting_summary.html
+++ b/httemplate/search/customer_accounting_summary.html
@@ -73,9 +73,11 @@
   $r++;
   } #$row
   $workbook->close;
+
+  http_header('Content-Length' => length($output));
+  $m->print($output);
 </%perl>
-<% $output %>
-% } else { 
+% } else {
 <& /elements/header.html, $title &>
 % my $myself = $cgi->self_url;
 <P ALIGN="right" CLASS="noprint">
diff --git a/httemplate/search/elements/search-xls.html b/httemplate/search/elements/search-xls.html
index 94d88b0..26a51c4 100644
--- a/httemplate/search/elements/search-xls.html
+++ b/httemplate/search/elements/search-xls.html
@@ -1,4 +1,3 @@
-<% $data %>
 <%init>
 
 my %args = @_;
@@ -148,5 +147,6 @@ if ( $opt{'footer'} ) {
 $workbook->close();# or die "Error creating .xls file: $!";
 
 http_header('Content-Length' => length($data) );
+$m->print($data);
 
 </%init>
diff --git a/httemplate/search/elements/search.html b/httemplate/search/elements/search.html
index eca68a2..5a16a22 100644
--- a/httemplate/search/elements/search.html
+++ b/httemplate/search/elements/search.html
@@ -176,7 +176,9 @@ Example:
 %
 % } elsif ( $type =~ /\.xls$/ ) {
 %
-<% include('search-xls.html',  header=>$header, rows=>$rows, opt=>\%opt ) %>
+<& 'search-xls.html',  header=>$header, rows=>$rows, opt=>\%opt &>\
+% # prevent the caller from polluting our output stream
+% $m->abort;
 %
 % } elsif ( $type eq 'xml' ) {
 %
diff --git a/httemplate/search/report_tax-xls.cgi b/httemplate/search/report_tax-xls.cgi
index f19f85a..bb843a7 100755
--- a/httemplate/search/report_tax-xls.cgi
+++ b/httemplate/search/report_tax-xls.cgi
@@ -1,4 +1,3 @@
-<% $data %>
 <%init>
 my $htmldoc = include('report_tax.cgi');
 
@@ -155,4 +154,6 @@ for my $x (0..scalar(@widths)-1) {
 
 $workbook->close;
 
+http_header('Content-Length' => length($data));
+$m->print($data);
 </%init>

-----------------------------------------------------------------------

Summary of changes:
 httemplate/graph/elements/report.html              |    4 ++--
 httemplate/search/customer_accounting_summary.html |    6 ++++--
 httemplate/search/elements/search-xls.html         |    2 +-
 httemplate/search/elements/search.html             |    4 +++-
 httemplate/search/report_tax-xls.cgi               |    3 ++-
 5 files changed, 12 insertions(+), 7 deletions(-)




More information about the freeside-commits mailing list