mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-04-24 03:59:08 -05:00
add: bbcode and linkify blade directives
Also add escaping content inside joypixels blade directive where necessary.
This commit is contained in:
@@ -16,8 +16,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Helpers\Bbcode;
|
||||
use App\Helpers\Linkify;
|
||||
use App\Traits\Auditable;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
@@ -154,14 +152,4 @@ class Post extends Model
|
||||
->select('id')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse Content And Return Valid HTML.
|
||||
*/
|
||||
public function getContentHtml(): string
|
||||
{
|
||||
$bbcode = new Bbcode();
|
||||
|
||||
return (new Linkify())->linky($bbcode->parse($this->content));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user