Ticket email subjects show HTML entities instead of the characters typed

Sheernox

New Member
Env: ClientExec 7.3.0 stable (ionCube), PHP 8.5.12, MariaDB 11.4.14, SMTP mail. Found on our production install, 2026-12-02.

Where: modules/support/models/TicketNotifications.php (encoded, so no line is cited) fills [TICKETSUBJECT] into the email template subject from the stored ticket subject, which ClientExec keeps HTML-escaped. library/vendor/phpmailer/phpmailer/src/PHPMailer.php 7.1.1 sends the subject as given.

Bug: A template subject that uses [TICKETSUBJECT] shows the escaped form in the inbox. A ticket titled "Billing & DNS <help>" arrives as "Billing &amp; DNS &lt;help&gt;". The email body is fine, because HTML renders the entities. The email log stores the same escaped subject.

Repro:
  1. In Settings > Company > Email Templates, set the Support Ticket Template subject to "Re: [TICKETSUBJECT]".
  2. Open a ticket for a client with the subject "Billing & DNS <help>" and add a staff reply.
  3. The client's email subject reads "[...] Re: Billing &amp; DNS &lt;help&gt;".

Fix: Decode HTML entities in the rendered subject before it is handed to the mailer (a subject is plain text), or fill subject tags from unescaped values.
 
Back
Top