Skip to content

Commit

Permalink
Issue #629: strip HTML tags when getting string width
Browse files Browse the repository at this point in the history
  • Loading branch information
rhell4 authored and mdjnelson committed Jul 23, 2024
1 parent 8d51e02 commit 02de845
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion classes/element_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 02de845

Please sign in to comment.