Support: Links and New lines are present now (fixes #38)

This commit is contained in:
veselcraft 2021-10-09 13:46:41 +03:00
parent 2ce3a1ae9d
commit 820c9c22fe
2 changed files with 14 additions and 3 deletions

View file

@ -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;
}

View file

@ -59,7 +59,11 @@ 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
@ -67,4 +71,5 @@ class TicketComment extends RowModel
return new DateTime($this->getRecord()->created);
}
use Traits\TRichText;
}