diff --git a/include/client/tickets.inc.php b/include/client/tickets.inc.php index 2c1a04a97c208e2bdadc6281cca2ee0cd093e9c0..6b8e9df1af38ee40b56dcc831ad260c156d5e235 100644 --- a/include/client/tickets.inc.php +++ b/include/client/tickets.inc.php @@ -157,11 +157,14 @@ $negorder=$order=='DESC'?'ASC':'DESC'; //Negate the sorting </thead> <tbody> <?php + $subject_field = TicketForm::objects()->one()->getField('subject'); if($res && ($num=db_num_rows($res))) { $defaultDept=Dept::getDefaultDeptName(); //Default public dept. while ($row = db_fetch_array($res)) { $dept= $row['ispublic']? $row['dept_name'] : $defaultDept; - $subject=Format::htmlchars(Format::truncate($row['subject'],40)); + $subject = Format::truncate($subject_field->display( + $subject_field->to_php($row['subject']) ?: $row['subject'] + ), 40); if($row['attachments']) $subject.=' <span class="Icon file"></span>'; diff --git a/include/staff/tickets.inc.php b/include/staff/tickets.inc.php index f6c17982c7aa39e88027b0b3f46a0c171e045360..70acec9195642decac3530a7be2267fb00a176b2 100644 --- a/include/staff/tickets.inc.php +++ b/include/staff/tickets.inc.php @@ -406,6 +406,8 @@ if ($results) { </thead> <tbody> <?php + // Setup Subject field for display + $subject_field = TicketForm::objects()->one()->getField('subject'); $class = "row1"; $total=0; if($res && ($num=count($results))): @@ -430,7 +432,10 @@ if ($results) { $lc=Format::truncate($row['dept_name'],40); } $tid=$row['number']; - $subject = Format::htmlchars(Format::truncate($row['subject'],40)); + + $subject = Format::truncate($subject_field->display( + $subject_field->to_php($row['subject']) ?: $row['subject'] + ), 40); $threadcount=$row['thread_count']; if(!strcasecmp($row['state'],'open') && !$row['isanswered'] && !$row['lock_id']) { $tid=sprintf('<b>%s</b>',$tid);