Groups: Allow line breaks in descriptions

Closes #542
This commit is contained in:
Maxim Leshchenko 2022-05-20 13:45:14 +01:00
parent 3a2c781cb0
commit 12210d0fb0
No known key found for this signature in database
GPG key ID: BB9C44A8733FBEEE
2 changed files with 7 additions and 1 deletions

View file

@ -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
{

View file

@ -29,7 +29,7 @@
</tr>
<tr>
<td><span class="nobold">{_"description"}:</span></td>
<td>{$club->getDescription()}</td>
<td>{$club->getDescriptionHtml()|noescape}</td>
</tr>
<tr n:if="!is_null($club->getWebsite())">
<td><span class="nobold">{_"website"}: </span></td>