diff --git a/Web/Models/Entities/Club.php b/Web/Models/Entities/Club.php index 7097ca15..96daff04 100644 --- a/Web/Models/Entities/Club.php +++ b/Web/Models/Entities/Club.php @@ -99,6 +99,12 @@ class Club extends RowModel { return $this->getRecord()->about; } + + function getDescriptionHtml(): ?string + { + if(!is_null($this->getDescription())) + return nl2br(htmlspecialchars($this->getDescription(), ENT_DISALLOWED | ENT_XHTML)); + } function getShortCode(): ?string { diff --git a/Web/Presenters/templates/Group/View.xml b/Web/Presenters/templates/Group/View.xml index 5e9acaac..b68fcd2b 100644 --- a/Web/Presenters/templates/Group/View.xml +++ b/Web/Presenters/templates/Group/View.xml @@ -29,7 +29,7 @@ {_"description"}: - {$club->getDescription()} + {$club->getDescriptionHtml()|noescape} {_"website"}: