diff --git a/classes/element_helper.php b/classes/element_helper.php index 2bad9f21..75cbe407 100644 --- a/classes/element_helper.php +++ b/classes/element_helper.php @@ -73,7 +73,8 @@ public static function render_content($pdf, $element, $content) { $y = $element->get_posy(); $w = $element->get_width(); $refpoint = $element->get_refpoint(); - $actualwidth = $pdf->GetStringWidth($content); + $cleanedcontent = clean_param($content, PARAM_NOTAGS); + $actualwidth = $pdf->GetStringWidth($cleanedcontent); $alignment = $element->get_alignment(); if ($w && $w < $actualwidth) {