From 135fa36e58e67cf54681b896b3f60d7c3dce32d2 Mon Sep 17 00:00:00 2001 From: Janusz Dobrowolski Date: Sat, 6 Aug 2016 10:43:40 +0200 Subject: [PATCH] Fixed broken html enities handling in longer TextWrap fields in reports. --- reporting/includes/class.pdf.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/reporting/includes/class.pdf.inc b/reporting/includes/class.pdf.inc index a1e98917..172c328a 100644 --- a/reporting/includes/class.pdf.inc +++ b/reporting/includes/class.pdf.inc @@ -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); -- 2.30.2