add a fake .pdf extension to placate some versions of IE. yay IE.
[freeside.git] / httemplate / view / cust_bill-pdf.cgi
index 03340a1..4578b7b 100755 (executable)
@@ -2,12 +2,12 @@
 
 #untaint invnum
 my($query) = $cgi->keywords;
-$query =~ /^(\d+)$/;
+$query =~ /^(\d+)(.pdf)?$/;
 my $invnum = $1;
 
 my $cust_bill = qsearchs('cust_bill',{'invnum'=>$invnum});
 die "Invoice #$invnum not found!" unless $cust_bill;
 
-http_header('Content-Type' => 'application/postscript' );
+http_header('Content-Type' => 'application/pdf' );
 %>
-<%= $cust_bill->print_ps %>
+<%= $cust_bill->print_pdf %>