3 namespace BookStack\Entities\Models;
5 use BookStack\Util\HtmlContentFilter;
8 * @property string $description
9 * @property string $description_html
11 trait HasHtmlDescription
14 * Get the HTML description for this book.
16 public function descriptionHtml(): string
18 $html = $this->description_html ?: '<p>' . nl2br(e($this->description)) . '</p>';
19 return HtmlContentFilter::removeScriptsFromHtmlString($html);