I spent a lot of time until I found this solution. Unfortunately the original osTicket version removes all html tags and any text inside angle brackets.
Solution:
Insert the two following lines to the file "class.thread.php" in line 715 (ThreadEntry:):
$vars = str_replace('
$vars = str_replace('>', '>', $vars);
I think it is safe.