Fixed broken html enities handling in longer TextWrap fields in reports.
authorJanusz Dobrowolski <janusz@frontaccounting.eu>
Sat, 6 Aug 2016 08:43:40 +0000 (10:43 +0200)
committerJanusz Dobrowolski <janusz@frontaccounting.eu>
Sat, 6 Aug 2016 08:45:54 +0000 (10:45 +0200)
reporting/includes/class.pdf.inc

index a1e989172ebd382e2ef01aba0719ffb29b9c50a5..172c328a9896c547e712239b9bccaa93efe297d7 100644 (file)
@@ -308,6 +308,7 @@ class Cpdf extends FPDI {
                else
                        $align = 'R';
 
+               $txt = parent::unhtmlentities($txt);
                // If horizontal scaling was requested, check to see if we're trying to scale
                // too much.  If so, cut back string first and then scale it.
                $maxScaleFactor = 1.4;
@@ -319,7 +320,7 @@ class Cpdf extends FPDI {
                $ret = $txt[1];
                $txt = $txt[0];
                $this->SetXY($xb, $this->h - $yb - $h);
-               $txt = parent::unhtmlentities($txt);
+
                if ($this->isunicode && $this->encoding != "UTF-8")
                        $txt = iconv($this->encoding, "UTF-8", $txt);
                $this->Cell($w, $h, $txt, $border, 0, $align, $fill, $link, $stretch);