HTML decode text when printing to Excel.
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Mon, 7 Jun 2010 07:18:10 +0000 (07:18 +0000)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Mon, 7 Jun 2010 07:18:10 +0000 (07:18 +0000)
CHANGELOG.txt
reporting/includes/excel_report.inc

index e68c9387e4463f5187402f8c25e62b961dc82b10..6d2b58901830fa1d41880b6028f05db7a484f85d 100644 (file)
@@ -19,6 +19,10 @@ Legend:
 ! -> Note
 $ -> Affected files
 
+07-Jun-2010 Joe Hunt
+# HTML decode text when printing to Excel.
+$ /reporting/includes/excel_report.inc
+
 06-Jun-2010 Janusz Dobrowolski
 # False overallocation fixed.
 $ /includes/ui/allocation_cart.inc
index 4f8dbc6a2e10907c41e0e5b2f313a933b6f3c0ee..c95c1b2ccb5a85f780c3e4053e477d6b4b0310bc 100644 (file)
@@ -522,6 +522,7 @@ class FrontReport extends Spreadsheet_Excel_Writer_Workbook
 
        function TextCol($c, $n, $txt, $corr=0, $r=0, $border=0, $fill=0, $link=NULL, $stretch=0)
        {
+               $txt = htmlspecialchars_decode($txt);   
                if ($this->aligns[$c] == 'right')
                        $this->sheet->writeString($this->y, $c, $txt, $this->formatRight);
                else    
@@ -555,6 +556,7 @@ class FrontReport extends Spreadsheet_Excel_Writer_Workbook
 
        function TextCol2($c, $n, $txt, $corr=0, $r=0, $border=0, $fill=0, $link=NULL, $stretch=0)
        {
+               $txt = htmlspecialchars_decode($txt);   
                $this->sheet->writeString($this->y, $c, $txt, $this->formatLeft);
                if ($n - $c > 1)
                        $this->sheet->mergeCells($this->y, $c, $this->y, $n - 1);