fix: long announcement breaks sidebar
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Baoshuo Ren 2022-09-28 16:52:29 +08:00
parent e8125e7e3a
commit a5d632c21c
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A

View File

@ -18,7 +18,7 @@
<?= $group['title'] ?> <?= $group['title'] ?>
</a> </a>
<?php if ($group_announcement): ?> <?php if ($group_announcement): ?>
<div id="announcement-content-<?= $group['id'] ?>"></div> <div id="announcement-content-<?= $group['id'] ?>" class="text-break"></div>
<script>(function(){ <script>(function(){
$('#announcement-content-<?= $group['id'] ?>') $('#announcement-content-<?= $group['id'] ?>')
.html(DOMPurify.sanitize(decodeURIComponent("<?= urlencode($group_announcement) ?>"), <?= DOM_SANITIZE_CONFIG ?>)); .html(DOMPurify.sanitize(decodeURIComponent("<?= urlencode($group_announcement) ?>"), <?= DOM_SANITIZE_CONFIG ?>));