diff --git a/Web/Models/Entities/Ticket.php b/Web/Models/Entities/Ticket.php index d66e08b1..1dea6e5d 100644 --- a/Web/Models/Entities/Ticket.php +++ b/Web/Models/Entities/Ticket.php @@ -43,7 +43,11 @@ class Ticket extends RowModel function getContext(): string { - return $this->getRecord()->text; + $text = $this->getRecord()->text; + $text = $this->formatLinks($text); + $text = $this->removeZalgo($text); + $text = nl2br($text); + return $text; } function getTime(): DateTime @@ -70,4 +74,6 @@ class Ticket extends RowModel { return (new Users)->get($this->getRecord()->user_id); } + + use Traits\TRichText; } diff --git a/Web/Models/Entities/TicketComment.php b/Web/Models/Entities/TicketComment.php index 28329cd7..35a0ce3f 100644 --- a/Web/Models/Entities/TicketComment.php +++ b/Web/Models/Entities/TicketComment.php @@ -59,12 +59,17 @@ class TicketComment extends RowModel function getContext(): string { - return $this->getRecord()->text; + $text = $this->getRecord()->text; + $text = $this->formatLinks($text); + $text = $this->removeZalgo($text); + $text = nl2br($text); + return $text; } function getTime(): DateTime { return new DateTime($this->getRecord()->created); } - + + use Traits\TRichText; }